blackdrag commented on code in PR #2673:
URL: https://github.com/apache/groovy/pull/2673#discussion_r3538044994
##########
src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java:
##########
@@ -1226,6 +1251,26 @@ void buildInvokeHandle() {
addExceptionHandler();
}
}
+
+ @Override
+ MetaMethod selectForColdReflection() {
+ if (safeNavigation || spread || args[0] == null
+ || args[0] instanceof Class || args[0] instanceof
GroovyInterceptable) {
+ return null;
+ }
Review Comment:
CastSelector is not supposed to be used for CallType.METHOD, also there are
no static method calls for CastSelector. CastSelector is for non-trivial casts
that may result in asType calls. if the receiver is Class it means we are
dealing with something like "(T) c" where c is an instance of Class. It is not
for a normal method call to asType(Class). Things left out of the spike are ok,
if the PR is not intended for merge. Otherwise it should have at the very least
a TODO.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]