From 90c34e3db4fdc7be79c62bd91905a2a84bbd673e Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 10 Jul 2025 21:14:16 -0700 Subject: Ensure generic constraints are checked before inner extension. (#7685) * Ensure generic constraints are checked before inner extension. * Add warning for non-standard generic extension. * Fix tests. * Fix test. * Ban interface types from equality constraints. * Fix. --- source/slang/slang-parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-parser.cpp') diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp index a2fd944eb..6401b3d06 100644 --- a/source/slang/slang-parser.cpp +++ b/source/slang/slang-parser.cpp @@ -3649,7 +3649,7 @@ static void parseOptionalGenericConstraints(Parser* parser, ContainerDecl* decl) // substitution needs to be filled during check Type* paramType = nullptr; - if (as(decl)) + if (as(decl) || as(decl)) { paramType = DeclRefType::create(parser->astBuilder, DeclRef(decl)); -- cgit v1.2.3