diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/reflection.cpp | 3 | ||||
| -rw-r--r-- | source/slang/slang.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index f9c704437..3b3306084 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -592,7 +592,8 @@ SLANG_API SlangReflectionType * spReflection_FindTypeByName(SlangReflection * re // when type lookup fails. // Slang::DiagnosticSink sink; - + + sink.sourceManager = programLayout->getTargetReq()->getLinkage()->getSourceManager();; RefPtr<Type> result = program->getTypeFromString(name, &sink); return (SlangReflectionType*)result.Ptr(); } diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 3582a6571..e97f5bb1b 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -557,7 +557,7 @@ Type* Program::getTypeFromString(String typeStr, DiagnosticSink* sink) RefPtr<Expr> typeExpr = linkage->parseTypeString( typeStr, s); type = checkProperType(linkage, TypeExp(typeExpr), sink); - if(type) + if (type && !type.as<ErrorType>()) break; } if( type ) |
