Mercurial > projects > ddmd
diff dmd/TemplateTypeParameter.d @ 51:b7d29f613539
StaticAssertStatement.syntaxCopy
IfStatement.syntaxCopy
CompoundDeclarationStatement.syntaxCopy
VoidInitializer.syntaxCopy
TypeAArray.syntaxCopy
TypeTypeof.syntaxCopy
TypeAArray.resolve
TypeSArray.deduceType
TypeAArray.deduceType
TypeAArray.implicitConvTo
TemplateDeclaration.leastAsSpecialized
TemplateTypeParameter.dummyArg
TypeIdentifier.deduceType
TemplateTypeParameter.syntaxCopy
Lexer.hexStringConstant
Lexer.delimitedStringConstant
GotoDefaultStatement.ctor
CaseRangeStatement.ctor
Type.castMod
StorageClassDeclaration.syntaxCopy
TemplateDeclaration.syntaxCopy
author | korDen |
---|---|
date | Sat, 21 Aug 2010 11:17:42 +0400 |
parents | 10317f0c89a5 |
children | 2e2a5c3f943a |
line wrap: on
line diff
--- a/dmd/TemplateTypeParameter.d Sat Aug 21 10:38:26 2010 +0400 +++ b/dmd/TemplateTypeParameter.d Sat Aug 21 11:17:42 2010 +0400 @@ -38,7 +38,12 @@ TemplateParameter syntaxCopy() { - assert(false); + TemplateTypeParameter tp = new TemplateTypeParameter(loc, ident, specType, defaultType); + if (tp.specType) + tp.specType = specType.syntaxCopy(); + if (defaultType) + tp.defaultType = defaultType.syntaxCopy(); + return tp; } void declareParameter(Scope sc) @@ -210,6 +215,15 @@ void* dummyArg() { - assert(false); + Type t; + + if (specType) + t = specType; + else + { + // Use this for alias-parameter's too (?) + t = new TypeIdentifier(loc, ident); + } + return cast(void *)t; } } \ No newline at end of file