Skip to content

Commit

Permalink
improve error messages in NativeImageGenerator.checkUniverse
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Apr 18, 2018
1 parent a3c6c6d commit af5062c
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,9 @@ private void checkUniverse() {
if (declaredType.isInterface()) {
state = TypeState.forSubtraction(bigbang, state, declaredType.getTypeFlow(bigbang, true).getState());
if (!state.isEmpty()) {
bigbang.getUnsupportedFeatures().addMessage(method.format("%H.%n(%p)"), method,
"Method parameter " + i + " has declaredType " + declaredType.toJavaName(true) + " and incompatible types in state: " + state);
String methodKey = method.format("%H.%n(%p)");
bigbang.getUnsupportedFeatures().addMessage(methodKey, method,
"Parameter " + i + " of " + methodKey + " has declared type " + declaredType.toJavaName(true) + " which is incompatible with types in state: " + state);
}
}
}
Expand All @@ -1207,8 +1208,9 @@ private void checkUniverse() {
if (declaredType.isInterface()) {
state = TypeState.forSubtraction(bigbang, state, declaredType.getTypeFlow(bigbang, true).getState());
if (!state.isEmpty()) {
bigbang.getUnsupportedFeatures().addMessage(field.format("%H.%n"), null,
"Field has declaredType " + declaredType.toJavaName(true) + " and incompatible types in state: " + state);
String fieldKey = field.format("%H.%n");
bigbang.getUnsupportedFeatures().addMessage(fieldKey, null,
"Field " + fieldKey + " has declared type " + declaredType.toJavaName(true) + " which is incompatible with types in state: " + state);
}
}
}
Expand Down

0 comments on commit af5062c

Please sign in to comment.