diff options
| author | Yong He <yonghe@outlook.com> | 2025-03-06 16:32:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 16:32:51 -0800 |
| commit | 2aaa91007a9f91674033dcb9d88eb9ad7bacae96 (patch) | |
| tree | 285281c3fb5d7fa7fe165fe74f1177e94f7c7c28 /source | |
| parent | 0ca1d7af62bb5a59347441ed2b0eb8e83791fb42 (diff) | |
Fix lowering of `extern` types with defaults. (#6512)
* Fix lowering of `extern` types with defaults.
* Fix test.
* Fix test.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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<DeclLoweringVisitor, LoweredValInfo> // 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<WitnessTable*, IRWitnessTable*> mapASTToIRWitnessTable; lowerWitnessTable( |
