From e5b796db188416dfc414dab27b92c86b0b53de2b Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 10 Sep 2020 15:10:11 -0700 Subject: Allow existential types in `StructuredBuffer` element type. (#1536) * Allow existential types in `StructuredBuffer` element type. * Handle StructuredBuffer.Load/.Consume methods * Clean up unnecessary changes * Code cleanup * Update test comment --- source/slang/slang-emit-c-like.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-emit-c-like.cpp') diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 090d06f28..8ef18242a 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -222,7 +222,7 @@ void CLikeSourceEmitter::emitSimpleType(IRType* type) List CLikeSourceEmitter::getSortedWitnessTableEntries(IRWitnessTable* witnessTable) { List sortedWitnessTableEntries; - auto interfaceType = cast(witnessTable->getOperand(0)); + auto interfaceType = cast(witnessTable->getConformanceType()); auto witnessTableItems = witnessTable->getChildren(); // Build a dictionary of witness table entries for fast lookup. Dictionary witnessTableEntryDictionary; -- cgit v1.2.3