Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Jython Snippet

View gist:2506332
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Set<String> allModified = Generic.set();
PyJavaType[] conflicted = inConflict.toArray(new PyJavaType[inConflict.size()]);
for (PyJavaType type : conflicted) {
if (type.modified == null) {
continue;
}
for (String method : type.modified) {
if (!allModified.add(method)) { // Another type in conflict has this method, fail
PyList types = new PyList();
for (PyJavaType othertype : conflicted) {
if (othertype.modified != null && othertype.modified.contains(method)) {
types.add(othertype);
}
}
throw Py.TypeError(String.format("Supertypes that share a modified attribute "
+ " have an MRO conflict[attribute=%s, types=%s]", method, types));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.