summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/check.cpp11
-rw-r--r--source/slang/syntax.cpp9
2 files changed, 14 insertions, 6 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index dbd9b37b7..2b7f8f2fc 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -5419,17 +5419,22 @@ namespace Slang
// Their arguments must unify
SLANG_RELEASE_ASSERT(fstGen->args.Count() == sndGen->args.Count());
UInt argCount = fstGen->args.Count();
+ bool okay = true;
for (UInt aa = 0; aa < argCount; ++aa)
{
if (!TryUnifyVals(constraints, fstGen->args[aa], sndGen->args[aa]))
- return false;
+ {
+ okay = false;
+ }
}
// Their "base" specializations must unify
if (!TryUnifySubstitutions(constraints, fstGen->outer, sndGen->outer))
- return false;
+ {
+ okay = false;
+ }
- return true;
+ return okay;
}
bool TryUnifyTypeParam(
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp
index 4881f301e..70e230f33 100644
--- a/source/slang/syntax.cpp
+++ b/source/slang/syntax.cpp
@@ -2011,10 +2011,13 @@ void Type::accept(IValVisitor* visitor, void* extra)
String DeclRefBase::toString() const
{
- StringBuilder sb;
- sb << this->getDecl()->getName()->text;
+ if (!decl) return "";
+
+ auto name = decl->getName();
+ if (!name) return "";
+
// TODO: need to print out substitutions too!
- return sb.ProduceString();
+ return name->text;
}
RefPtr<ThisTypeSubstitution> getThisTypeSubst(DeclRefBase & declRef, bool insertSubstEntry)