Browse Source

Fix using parent's members in TypeMembers

Background: For some classes the TypeId does not have the super class but the definition has. Now checking both
kindlich 4 years ago
parent
commit
8bc801385c
No known key found for this signature in database

+ 3
- 0
CodeModel/src/main/java/org/openzen/zenscript/codemodel/type/member/TypeMemberBuilder.java View File

530
 		if (definitionType.superType != null) {
530
 		if (definitionType.superType != null) {
531
 			cache.get(definitionType.superType.stored(type.getSpecifiedStorage()))
531
 			cache.get(definitionType.superType.stored(type.getSpecifiedStorage()))
532
 					.copyMembersTo(members, TypeMemberPriority.INHERITED);
532
 					.copyMembersTo(members, TypeMemberPriority.INHERITED);
533
+		} else if(definition.getSuperType() != null) {
534
+			cache.get(definition.getSuperType().stored(type.getSpecifiedStorage()))
535
+					.copyMembersTo(members, TypeMemberPriority.INHERITED);
533
 		} else {
536
 		} else {
534
 			getter(definition, OBJECT_HASHCODE, "objectHashCode", INT.stored);
537
 			getter(definition, OBJECT_HASHCODE, "objectHashCode", INT.stored);
535
 		}
538
 		}

Loading…
Cancel
Save