@@ 168,8 168,13 @@ namespace K3 {
else if (type.IsInt32()) list.emplace_back("int32_t");
else if (type.IsInt64()) list.emplace_back("int64_t");
else if (type.IsPair()) {
- GenerateMembers(type.First(), list);
- GenerateMembers(type.Rest(), list);
+ Type current = type;
+ while(current.IsPair()) {
+ GenerateMembers(current.First(), list);
+ current = current.Rest();
+ }
+ GenerateMembers(current, list);
+
} else if (type.IsUserType()) {
GenerateMembers(type.UnwrapUserType(), list);
} else if (type.IsNativeVector()) {