cover some more cases

This commit is contained in:
David Renshaw 2016-09-19 15:52:30 -04:00
parent 7da1dc8159
commit 99107e64a5
2 changed files with 10 additions and 1 deletions

View file

@ -1191,7 +1191,11 @@ private:
bool isGeneric = false; bool isGeneric = false;
{ {
auto type = field.getType().asList().getElementType(); auto type = field.getType();
while (type.isList()) {
type = type.asList().getElementType();
}
if (type.isStruct()) { if (type.isStruct()) {
isGeneric = type.asStruct().getProto().getIsGeneric(); isGeneric = type.asStruct().getProto().getIsGeneric();
} }

View file

@ -386,6 +386,11 @@ struct GenericMap(K, V)
key @0 :K; key @0 :K;
value @1 :V; value @1 :V;
} }
# Some other things that might cause problems.
a @1 :List(TestAllTypes);
b @2 :List(List(Entry));
c @3 :List(List(List(Entry)));
} }
struct TestEmptyStruct {} struct TestEmptyStruct {}