From 76db3636418f1667db1c8b0d3b6cfec6c652cc84 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 4 Nov 2017 06:57:48 -0400 Subject: work in-progress --- source/slang/syntax.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'source/slang/syntax.cpp') diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp index 2f3368f4c..24d508ed5 100644 --- a/source/slang/syntax.cpp +++ b/source/slang/syntax.cpp @@ -1213,7 +1213,7 @@ void Type::accept(IValVisitor* visitor, void* extra) } if (!outer) - return !subst->outer; + return !subst->outer || subst->outer.As(); if (!outer->Equals(subst->outer.Ptr())) return false; @@ -1258,19 +1258,9 @@ void Type::accept(IValVisitor* visitor, void* extra) bool ThisTypeSubstitution::Equals(Substitutions* subst) { - // both must be NULL, or non-NULL - if (!this || !subst) - return !this && !subst; - auto thisSubst = dynamic_cast(subst); - if (!thisSubst) - return false; - if (!sourceType && thisSubst->sourceType || sourceType && !thisSubst->sourceType) - return false; - if (thisSubst->sourceType && !thisSubst->sourceType->EqualsVal(sourceType)) - return false; - if (!outer->Equals(subst->outer.Ptr())) - return false; - return true; + if (subst && dynamic_cast(subst)) + return true; + return false; } -- cgit v1.2.3