From 2aaa91007a9f91674033dcb9d88eb9ad7bacae96 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 6 Mar 2025 16:32:51 -0800 Subject: Fix lowering of `extern` types with defaults. (#6512) * Fix lowering of `extern` types with defaults. * Fix test. * Fix test. --- source/slang/slang-lower-to-ir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 9ca22fead..e43f99b1e 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -8193,7 +8193,8 @@ struct DeclLoweringVisitor : DeclVisitor // Make sure that all the entries in the witness table have been filled in, // including any cases where there are sub-witness-tables for conformances bool isExplicitExtern = false; - if (!isImportedDecl(context, parentDecl, isExplicitExtern)) + bool isImported = isImportedDecl(context, parentDecl, isExplicitExtern); + if (!isImported || isExplicitExtern) { Dictionary mapASTToIRWitnessTable; lowerWitnessTable( -- cgit v1.2.3