diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index c7f6c920c..7fc519c03 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -2784,7 +2784,12 @@ Type* ComponentType::getTypeFromString(String const& typeStr, DiagnosticSink* si SLANG_AST_BUILDER_RAII(linkage->getASTBuilder()); Expr* typeExpr = linkage->parseTermString(typeStr, scope); - type = checkProperType(linkage, TypeExp(typeExpr), sink); + SharedSemanticsContext sharedSemanticsContext(linkage, nullptr, sink); + SemanticsVisitor visitor(&sharedSemanticsContext); + type = visitor.TranslateTypeNode(typeExpr); + auto typeOut = visitor.tryCoerceToProperType(TypeExp(type)); + if (typeOut.type) + type = typeOut.type; if (type) { |
