Skip to content

Commit b5174b4

Browse files
Fix issue with synthesized __init methods not getting added to witness table (shader-slang#4638)
1 parent 12ecc43 commit b5174b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/slang/slang-check-decl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -4268,8 +4268,8 @@ namespace Slang
42684268
}
42694269
if (isDefaultInitializableType)
42704270
context->parentDecl->addMember(ctorDecl);
4271-
else
4272-
_addMethodWitness(witnessTable, requiredMemberDeclRef, makeDeclRef(ctorDecl));
4271+
4272+
_addMethodWitness(witnessTable, requiredMemberDeclRef, makeDeclRef(ctorDecl));
42734273

42744274
return true;
42754275
}

tests/compute/assoctype-nested-lookup.slang

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
77
RWStructuredBuffer<float> outputBuffer;
88

9-
interface IFoo
9+
interface IFoo : IDefaultInitializable
1010
{
1111
associatedtype Bar : IFoo;
1212
};

0 commit comments

Comments
 (0)