summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckDeclaration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus/CheckDeclaration.cpp')
-rw-r--r--src/shared/cplusplus/CheckDeclaration.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shared/cplusplus/CheckDeclaration.cpp b/src/shared/cplusplus/CheckDeclaration.cpp
index 3349263e1e..719a0c82eb 100644
--- a/src/shared/cplusplus/CheckDeclaration.cpp
+++ b/src/shared/cplusplus/CheckDeclaration.cpp
@@ -459,7 +459,9 @@ bool CheckDeclaration::visit(TypenameTypeParameterAST *ast)
sourceLocation = ast->name->firstToken();
const Name *name = semantic()->check(ast->name, _scope);
- Argument *arg = control()->newArgument(sourceLocation, name); // ### new template type
+ TypenameArgument *arg = control()->newTypenameArgument(sourceLocation, name);
+ FullySpecifiedType ty = semantic()->check(ast->type_id, _scope);
+ arg->setType(ty);
ast->symbol = arg;
_scope->enterSymbol(arg);
return false;
@@ -472,7 +474,9 @@ bool CheckDeclaration::visit(TemplateTypeParameterAST *ast)
sourceLocation = ast->name->firstToken();
const Name *name = semantic()->check(ast->name, _scope);
- Argument *arg = control()->newArgument(sourceLocation, name); // ### new template type
+ TypenameArgument *arg = control()->newTypenameArgument(sourceLocation, name);
+ FullySpecifiedType ty = semantic()->check(ast->type_id, _scope);
+ arg->setType(ty);
ast->symbol = arg;
_scope->enterSymbol(arg);
return false;