diff options
| author | Yong He <yonghe@outlook.com> | 2018-01-09 10:50:44 -0800 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-01-09 10:50:44 -0800 |
| commit | 8daafcc2e4bf7b2dfb66d7a3b7ac60c86b2d926c (patch) | |
| tree | b7fac301e3c4d1b006af70584feeb45af191aab6 /source/slang/syntax.h | |
| parent | 3d435f7321c3f9241d33a0f7521573f21b548186 (diff) | |
bruteforce implementation of witness table resolution for associated (#358)
Diffstat (limited to 'source/slang/syntax.h')
| -rw-r--r-- | source/slang/syntax.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h index 00e6bd6d3..a1f4ba801 100644 --- a/source/slang/syntax.h +++ b/source/slang/syntax.h @@ -102,7 +102,8 @@ namespace Slang Double, }; - + class Decl; + class Val; // Forward-declare all syntax classes #define SYNTAX_CLASS(NAME, BASE, ...) class NAME; @@ -991,9 +992,9 @@ namespace Slang return declRef.Substitute(declRef.getDecl()->sub.Ptr()); } - inline RefPtr<Type> GetSup(DeclRef<GenericTypeConstraintDecl> const& declRef) + inline RefPtr<Type> GetSup(DeclRef<TypeConstraintDecl> const& declRef) { - return declRef.Substitute(declRef.getDecl()->sup.Ptr()); + return declRef.Substitute(declRef.getDecl()->getSup().type); } // Note(tfoley): These logically belong to `Type`, |
