From 87ec3ea65bc42214c4e78c991ec2033fc103bf63 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 30 Jun 2018 12:30:38 +0800 Subject: HIR Expand VTable - Fix incorrect associated type lookups --- src/trans/codegen_c.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/trans/codegen_c.cpp') diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index c30657bf..91138d14 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -1923,6 +1923,7 @@ namespace { // Find the corresponding vtable entry for(const auto& m : trait.m_value_indexes) { + // NOTE: The "3" is the number of non-method vtable entries if( m.second.first != 3+i ) continue ; -- cgit v1.2.3