diff --git a/src/ir/subtypes.h b/src/ir/subtypes.h index aedf68dd842..ae3a27878f5 100644 --- a/src/ir/subtypes.h +++ b/src/ir/subtypes.h @@ -158,8 +158,9 @@ struct SubTypes { depths[HeapTypes::noexn.getBasic(share)] = 0; // func would appear already if we saw function types, but if not, ensure - // it exists here. + // it exists here. Ditto for cont. depths[HeapTypes::func.getBasic(share)]; + depths[HeapTypes::cont.getBasic(share)]; } return depths; diff --git a/test/gtest/type-builder.cpp b/test/gtest/type-builder.cpp index 40d02ad361d..24b7f26ded5 100644 --- a/test/gtest/type-builder.cpp +++ b/test/gtest/type-builder.cpp @@ -1614,6 +1614,7 @@ TEST_F(TypeTest, TestMaxStructDepths) { EXPECT_EQ(maxDepths[HeapType::nocont], Index(0)); EXPECT_EQ(maxDepths[HeapType::noexn], Index(0)); EXPECT_EQ(maxDepths[HeapType::func], Index(0)); + EXPECT_EQ(maxDepths[HeapType::cont], Index(0)); } TEST_F(TypeTest, TestMaxArrayDepths) {