summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/check.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index 40461d0a3..f7cb3b575 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -5149,6 +5149,20 @@ namespace Slang
}
}
+ if (auto fstWit = fst.As<DeclaredSubtypeWitness>())
+ {
+ if (auto sndWit = snd.As<DeclaredSubtypeWitness>())
+ {
+ auto constraintDecl1 = fstWit->declRef.As<TypeConstraintDecl>();
+ auto constraintDecl2 = sndWit->declRef.As<TypeConstraintDecl>();
+ assert(constraintDecl1);
+ assert(constraintDecl2);
+ return TryUnifyTypes(constraints,
+ constraintDecl1.getDecl()->getSup().type,
+ constraintDecl2.getDecl()->getSup().type);
+ }
+ }
+
throw "unimplemented";
// default: fail