summaryrefslogtreecommitdiff
path: root/source/slang/val-defs.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-16 15:38:36 -0500
committerYong He <yonghe@outlook.com>2018-01-16 15:38:36 -0500
commita74a5494b34e2b41a294042ab8b3e7bce115dcba (patch)
tree9895842d33893b9a233f58964cfa55b3974d6134 /source/slang/val-defs.h
parent59691aeeb013c5bb7cdaa31a6fc572eebd8be610 (diff)
bug fixes to get falcor example shader code to compile.
1. prevent cyclic lookups when an interface inherits transitively from itself. 2. in `createGlobalGenericParamSubstitution`, create a default substitution for the base type declref before using it to lookup the witness table.
Diffstat (limited to 'source/slang/val-defs.h')
-rw-r--r--source/slang/val-defs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/val-defs.h b/source/slang/val-defs.h
index 1fe3bfe44..d83cda85c 100644
--- a/source/slang/val-defs.h
+++ b/source/slang/val-defs.h
@@ -90,6 +90,18 @@ ABSTRACT_SYNTAX_CLASS(SubtypeWitness, Witness)
)
END_SYNTAX_CLASS()
+SYNTAX_CLASS(TypeEqualityWitness, SubtypeWitness)
+RAW(
+ virtual bool EqualsVal(Val* val) override;
+ virtual String ToString() override;
+ virtual int GetHashCode() override;
+ virtual RefPtr<Val> SubstituteImpl(SubstitutionSet subst, int * ioDiff) override;
+ virtual DeclRef<Decl> getLastStepDeclRef() override
+ {
+ return DeclRef<Decl>();
+ }
+)
+END_SYNTAX_CLASS()
// A witness that one type is a subtype of another
// because some in-scope declaration says so
SYNTAX_CLASS(DeclaredSubtypeWitness, SubtypeWitness)