- Timestamp:
- Nov 17, 2017, 5:33:14 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 5c4d27f
- Parents:
- 9e1eabc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
r9e1eabc r48fa824 423 423 } 424 424 425 void checkGenericParameters( ReferenceToType * inst ) { 426 for ( Expression * param : inst->parameters ) { 427 if ( ! dynamic_cast< TypeExpr * >( param ) ) { 428 throw SemanticError( "Expression parameters for generic types are currently unsupported: ", inst ); 429 } 430 } 431 } 432 425 433 void LinkReferenceToTypes::postvisit( StructInstType *structInst ) { 426 434 StructDecl *st = local_indexer->lookupStruct( structInst->get_name() ); … … 434 442 forwardStructs[ structInst->get_name() ].push_back( structInst ); 435 443 } // if 444 checkGenericParameters( structInst ); 436 445 } 437 446 … … 446 455 forwardUnions[ unionInst->get_name() ].push_back( unionInst ); 447 456 } // if 457 checkGenericParameters( unionInst ); 448 458 } 449 459
Note: See TracChangeset
for help on using the changeset viewer.