Skip to content

Commit

Permalink
Disambiguate Constructor and Method when calling getRoot().
Browse files Browse the repository at this point in the history
Avoid merging Target_java_lang_reflect_Method and Target_java_lang_reflect_Constructor when calling asExecutable() by adding a separate asExecutable() method for the two.
  • Loading branch information
cstancu committed May 3, 2019
1 parent 7cd4f3c commit 1873d37
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@ private static Target_java_lang_reflect_Constructor asConstructor(Object object)
return KnownIntrinsics.unsafeCast(object, Target_java_lang_reflect_Constructor.class);
}

private static Target_java_lang_reflect_Executable asExecutable(Object object) {
private static Target_java_lang_reflect_Executable asExecutable(Target_java_lang_reflect_Method object) {
return KnownIntrinsics.unsafeCast(object, Target_java_lang_reflect_Executable.class);
}

private static Target_java_lang_reflect_Executable asExecutable(Target_java_lang_reflect_Constructor object) {
return KnownIntrinsics.unsafeCast(object, Target_java_lang_reflect_Executable.class);
}

private static Target_java_lang_reflect_Executable asExecutable(Target_java_lang_reflect_AccessibleObject object) {
return KnownIntrinsics.unsafeCast(object, Target_java_lang_reflect_Executable.class);
}

Expand Down

0 comments on commit 1873d37

Please sign in to comment.