diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-08 11:09:17 -0500 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-08 11:09:17 -0500 |
| commit | ef19b423b46bed4739a1e86a26cfbb18c221d497 (patch) | |
| tree | af3e11110c2986a499b405afd07ef24f061c52f8 /source/slang/syntax.cpp | |
| parent | e1710807292544775dc6a0eb338af081fb94493e (diff) | |
Cleanup of "suport generic interface method".
Add a GenericValueParamDecl case in doesGenericSignatureMatchRequirement()
Return a substituted DeclaredSubtypeWitness in DeclaredSubtypeWitness::SubstituteImpl() instead of return this.
Diffstat (limited to 'source/slang/syntax.cpp')
| -rw-r--r-- | source/slang/syntax.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/syntax.cpp b/source/slang/syntax.cpp index 4e1778e6e..70730ff95 100644 --- a/source/slang/syntax.cpp +++ b/source/slang/syntax.cpp @@ -1579,7 +1579,11 @@ void Type::accept(IValVisitor* visitor, void* extra) } } } - return this; + RefPtr<DeclaredSubtypeWitness> rs = new DeclaredSubtypeWitness(); + rs->sub = sub->SubstituteImpl(subst, ioDiff).As<Type>(); + rs->sup = sup->SubstituteImpl(subst, ioDiff).As<Type>(); + rs->declRef = declRef.SubstituteImpl(subst, ioDiff); + return rs; } String DeclaredSubtypeWitness::ToString() |
