Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision b69233aced1c8e524868a8ea35b14931e9676cf1)
+++ src/AST/Convert.cpp	(revision c0f9efeefd59bb9e71cd8166db00a07029994d6e)
@@ -1075,7 +1075,15 @@
 	}
 
+	const ast::Type * visitType( const ast::Type * node, Type * type ) {
+		// Some types do this in their constructor so add a check.
+		if ( !node->attributes.empty() && type->attributes.empty() ) {
+			type->attributes = get<Attribute>().acceptL( node->attributes );
+		}
+		this->node = type;
+		return nullptr;
+	}
+
 	const ast::Type * visit( const ast::VoidType * node ) override final {
-		this->node = new VoidType{ cv( node ) };
-		return nullptr;
+		return visitType( node, new VoidType{ cv( node ) } );
 	}
 
@@ -1086,10 +1094,9 @@
 			Validate::SizeType = type;
 		}
-		this->node = type;
-		return nullptr;
+		return visitType( node, type );
 	}
 
 	const ast::Type * visit( const ast::PointerType * node ) override final {
-		this->node = new PointerType{
+		return visitType( node, new PointerType{
 			cv( node ),
 			get<Type>().accept1( node->base ),
@@ -1097,10 +1104,9 @@
 			(bool)node->isVarLen,
 			(bool)node->isStatic
-		};
-		return nullptr;
+		} );
 	}
 
 	const ast::Type * visit( const ast::ArrayType * node ) override final {
-		this->node = new ArrayType{
+		return visitType( node, new ArrayType{
 			cv( node ),
 			get<Type>().accept1( node->base ),
@@ -1108,23 +1114,20 @@
 			(bool)node->isVarLen,
 			(bool)node->isStatic
-		};
-		return nullptr;
+		} );
 	}
 
 	const ast::Type * visit( const ast::ReferenceType * node ) override final {
-		this->node = new ReferenceType{
+		return visitType( node, new ReferenceType{
 			cv( node ),
 			get<Type>().accept1( node->base )
-		};
-		return nullptr;
+		} );
 	}
 
 	const ast::Type * visit( const ast::QualifiedType * node ) override final {
-		this->node = new QualifiedType{
+		return visitType( node, new QualifiedType{
 			cv( node ),
 			get<Type>().accept1( node->parent ),
 			get<Type>().accept1( node->child )
-		};
-		return nullptr;
+		} );
 	}
 
@@ -1137,12 +1140,12 @@
 		ty->parameters = get<DeclarationWithType>().acceptL( node->params );
 		ty->forall = get<TypeDecl>().acceptL( node->forall );
-		this->node = ty;
-		return nullptr;
-	}
-
-	void postvisit( const ast::ReferenceToType * old, ReferenceToType * ty ) {
+		return visitType( node, ty );
+	}
+
+	const ast::Type * postvisit( const ast::ReferenceToType * old, ReferenceToType * ty ) {
 		ty->forall = get<TypeDecl>().acceptL( old->forall );
 		ty->parameters = get<Expression>().acceptL( old->params );
 		ty->hoistType = old->hoistType;
+		return visitType( old, ty );
 	}
 
@@ -1162,7 +1165,5 @@
 			};
 		}
-		postvisit( node, ty );
-		this->node = ty;
-		return nullptr;
+		return postvisit( node, ty );
 	}
 
@@ -1182,7 +1183,5 @@
 			};
 		}
-		postvisit( node, ty );
-		this->node = ty;
-		return nullptr;
+		return postvisit( node, ty );
 	}
 
@@ -1202,7 +1201,5 @@
 			};
 		}
-		postvisit( node, ty );
-		this->node = ty;
-		return nullptr;
+		return postvisit( node, ty );
 	}
 
@@ -1222,7 +1219,5 @@
 			};
 		}
-		postvisit( node, ty );
-		this->node = ty;
-		return nullptr;
+		return postvisit( node, ty );
 	}
 
@@ -1244,45 +1239,37 @@
 			};
 		}
-		postvisit( node, ty );
-		this->node = ty;
-		return nullptr;
+		return postvisit( node, ty );
 	}
 
 	const ast::Type * visit( const ast::TupleType * node ) override final {
-		this->node = new TupleType{
+		return visitType( node, new TupleType{
 			cv( node ),
 			get<Type>().acceptL( node->types )
 			// members generated by TupleType c'tor
-		};
-		return nullptr;
+		} );
 	}
 
 	const ast::Type * visit( const ast::TypeofType * node ) override final {
-		this->node = new TypeofType{
+		return visitType( node, new TypeofType{
 			cv( node ),
 			get<Expression>().accept1( node->expr ),
 			(bool)node->kind
-		};
-		return nullptr;
+		} );
 	}
 
 	const ast::Type * visit( const ast::VarArgsType * node ) override final {
-		this->node = new VarArgsType{ cv( node ) };
-		return nullptr;
+		return visitType( node, new VarArgsType{ cv( node ) } );
 	}
 
 	const ast::Type * visit( const ast::ZeroType * node ) override final {
-		this->node = new ZeroType{ cv( node ) };
-		return nullptr;
+		return visitType( node, new ZeroType{ cv( node ) } );
 	}
 
 	const ast::Type * visit( const ast::OneType * node ) override final {
-		this->node = new OneType{ cv( node ) };
-		return nullptr;
-	}
-
-	const ast::Type * visit( const ast::GlobalScopeType * ) override final {
-		this->node = new GlobalScopeType{};
-		return nullptr;
+		return visitType( node, new OneType{ cv( node ) } );
+	}
+
+	const ast::Type * visit( const ast::GlobalScopeType * node ) override final {
+		return visitType( node, new GlobalScopeType{} );
 	}
 
@@ -2442,6 +2429,14 @@
 	}
 
+	void visitType( Type * old, ast::Type * type ) {
+		// Some types do this in their constructor so add a check.
+		if ( !old->attributes.empty() && type->attributes.empty() ) {
+			type->attributes = GET_ACCEPT_V(attributes, Attribute);
+		}
+		this->node = type;
+	}
+
 	virtual void visit( VoidType * old ) override final {
-		this->node = new ast::VoidType{ cv( old ) };
+		visitType( old, new ast::VoidType{ cv( old ) } );
 	}
 
@@ -2452,9 +2447,9 @@
 			sizeType = type;
 		}
-		this->node = type;
+		visitType( old, type );
 	}
 
 	virtual void visit( PointerType * old ) override final {
-		this->node = new ast::PointerType{
+		visitType( old, new ast::PointerType{
 			GET_ACCEPT_1( base, Type ),
 			GET_ACCEPT_1( dimension, Expr ),
@@ -2462,9 +2457,9 @@
 			(ast::DimensionFlag)old->isStatic,
 			cv( old )
-		};
+		} );
 	}
 
 	virtual void visit( ArrayType * old ) override final {
-		this->node = new ast::ArrayType{
+		visitType( old, new ast::ArrayType{
 			GET_ACCEPT_1( base, Type ),
 			GET_ACCEPT_1( dimension, Expr ),
@@ -2472,20 +2467,20 @@
 			(ast::DimensionFlag)old->isStatic,
 			cv( old )
-		};
+		} );
 	}
 
 	virtual void visit( ReferenceType * old ) override final {
-		this->node = new ast::ReferenceType{
+		visitType( old, new ast::ReferenceType{
 			GET_ACCEPT_1( base, Type ),
 			cv( old )
-		};
+		} );
 	}
 
 	virtual void visit( QualifiedType * old ) override final {
-		this->node = new ast::QualifiedType{
+		visitType( old, new ast::QualifiedType{
 			GET_ACCEPT_1( parent, Type ),
 			GET_ACCEPT_1( child, Type ),
 			cv( old )
-		};
+		} );
 	}
 
@@ -2498,5 +2493,5 @@
 		ty->params = GET_ACCEPT_V( parameters, DeclWithType );
 		ty->forall = GET_ACCEPT_V( forall, TypeDecl );
-		this->node = ty;
+		visitType( old, ty );
 	}
 
@@ -2505,4 +2500,5 @@
 		ty->params = GET_ACCEPT_V( parameters, Expr );
 		ty->hoistType = old->hoistType;
+		visitType( old, ty );
 	}
 
@@ -2523,5 +2519,4 @@
 		}
 		postvisit( old, ty );
-		this->node = ty;
 	}
 
@@ -2542,5 +2537,4 @@
 		}
 		postvisit( old, ty );
-		this->node = ty;
 	}
 
@@ -2561,5 +2555,4 @@
 		}
 		postvisit( old, ty );
-		this->node = ty;
 	}
 
@@ -2580,5 +2573,4 @@
 		}
 		postvisit( old, ty );
-		this->node = ty;
 	}
 
@@ -2601,21 +2593,20 @@
 		}
 		postvisit( old, ty );
-		this->node = ty;
 	}
 
 	virtual void visit( TupleType * old ) override final {
-		this->node = new ast::TupleType{
+		visitType( old, new ast::TupleType{
 			GET_ACCEPT_V( types, Type ),
 			// members generated by TupleType c'tor
 			cv( old )
-		};
+		} );
 	}
 
 	virtual void visit( TypeofType * old ) override final {
-		this->node = new ast::TypeofType{
+		visitType( old, new ast::TypeofType{
 			GET_ACCEPT_1( expr, Expr ),
 			(ast::TypeofType::Kind)old->is_basetypeof,
 			cv( old )
-		};
+		} );
 	}
 
@@ -2625,17 +2616,17 @@
 
 	virtual void visit( VarArgsType * old ) override final {
-		this->node = new ast::VarArgsType{ cv( old ) };
+		visitType( old, new ast::VarArgsType{ cv( old ) } );
 	}
 
 	virtual void visit( ZeroType * old ) override final {
-		this->node = new ast::ZeroType{ cv( old ) };
+		visitType( old, new ast::ZeroType{ cv( old ) } );
 	}
 
 	virtual void visit( OneType * old ) override final {
-		this->node = new ast::OneType{ cv( old ) };
-	}
-
-	virtual void visit( GlobalScopeType * ) override final {
-		this->node = new ast::GlobalScopeType{};
+		visitType( old, new ast::OneType{ cv( old ) } );
+	}
+
+	virtual void visit( GlobalScopeType * old ) override final {
+		visitType( old, new ast::GlobalScopeType{} );
 	}
 
Index: src/AST/Type.hpp
===================================================================
--- src/AST/Type.hpp	(revision b69233aced1c8e524868a8ea35b14931e9676cf1)
+++ src/AST/Type.hpp	(revision c0f9efeefd59bb9e71cd8166db00a07029994d6e)
@@ -39,5 +39,5 @@
 	std::vector<ptr<Attribute>> attributes;
 
-	Type( CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} ) 
+	Type( CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} )
 	: qualifiers(q), attributes(std::move(as)) {}
 
@@ -270,9 +270,9 @@
 	ForallList forall;
 
-	ParameterizedType( ForallList&& fs = {}, CV::Qualifiers q = {}, 
+	ParameterizedType( ForallList&& fs = {}, CV::Qualifiers q = {},
 		std::vector<ptr<Attribute>> && as = {} )
 	: Type(q, std::move(as)), forall(std::move(fs)) {}
-	
-	ParameterizedType( CV::Qualifiers q, std::vector<ptr<Attribute>> && as = {} ) 
+
+	ParameterizedType( CV::Qualifiers q, std::vector<ptr<Attribute>> && as = {} )
 	: Type(q, std::move(as)), forall() {}
 
