Browse Source

Skip non-linear interface implementations for Native classes

Fixes an issue where Std::List would implement Iterable and therefore break the scripts.
kindlich 5 years ago
parent
commit
fb3382704d
No known key found for this signature in database

+ 7
- 0
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/definitions/JavaMemberVisitor.java View File

190
 			for (IDefinitionMember imember : member.members)
190
 			for (IDefinitionMember imember : member.members)
191
 				imember.accept(this);
191
 				imember.accept(this);
192
 		} else {
192
 		} else {
193
+			//TODO: Fixme???
194
+			// What should I do if a native class has interfaces to be visited?
195
+			if(javaModule.getNativeClassInfo(member.definition) != null) {
196
+				return null;
197
+			}
198
+
199
+
193
 			throw new UnsupportedOperationException("Non-inline interface implementations not yet available");
200
 			throw new UnsupportedOperationException("Non-inline interface implementations not yet available");
194
 		}
201
 		}
195
 		return null;
202
 		return null;

Loading…
Cancel
Save