diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 6c1a59ea4..aefe70a4a 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -890,24 +890,13 @@ Type* ComponentType::getTypeFromString( // the modules that were directly or // indirectly referenced. // - // TODO: This `scopesToTry` idiom appears - // all over the code, and isn't really - // how we should be handling this kind of - // lookup at all. - // - List<RefPtr<Scope>> scopesToTry; - for(auto module : getModuleDependencies()) - scopesToTry.add(module->getModuleDecl()->scope); + RefPtr<Scope> scope = _createScopeForLegacyLookup(); auto linkage = getLinkage(); - for(auto& s : scopesToTry) - { - RefPtr<Expr> typeExpr = linkage->parseTermString( - typeStr, s); - type = checkProperType(linkage, TypeExp(typeExpr), sink); - if (type && !type.as<ErrorType>()) - break; - } + RefPtr<Expr> typeExpr = linkage->parseTermString( + typeStr, scope); + type = checkProperType(linkage, TypeExp(typeExpr), sink); + if( type ) { m_types[typeStr] = type; @@ -915,9 +904,6 @@ Type* ComponentType::getTypeFromString( return type; } - - - CompileRequestBase::CompileRequestBase( Linkage* linkage, DiagnosticSink* sink) |
