Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
8bc801385c
Šim parakstam datu bāzē netika atrasta zināma atslēga

+ 3
- 0
CodeModel/src/main/java/org/openzen/zenscript/codemodel/type/member/TypeMemberBuilder.java Parādīt failu

@@ -530,6 +530,9 @@ public class TypeMemberBuilder implements TypeVisitorWithContext<Void, Void, Run
530 530
 		if (definitionType.superType != null) {
531 531
 			cache.get(definitionType.superType.stored(type.getSpecifiedStorage()))
532 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 536
 		} else {
534 537
 			getter(definition, OBJECT_HASHCODE, "objectHashCode", INT.stored);
535 538
 		}

Notiek ielāde…
Atcelt
Saglabāt