From 8daafcc2e4bf7b2dfb66d7a3b7ac60c86b2d926c Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 9 Jan 2018 10:50:44 -0800 Subject: bruteforce implementation of witness table resolution for associated (#358) --- source/slang/syntax.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/slang/syntax.h') 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 GetSup(DeclRef const& declRef) + inline RefPtr GetSup(DeclRef const& declRef) { - return declRef.Substitute(declRef.getDecl()->sup.Ptr()); + return declRef.Substitute(declRef.getDecl()->getSup().type); } // Note(tfoley): These logically belong to `Type`, -- cgit v1.2.3