Fix 159: passing the result of autoclass to java.lang.Class parameter.

This commit is contained in:
Benson Margulies 2015-04-30 14:04:58 -04:00
parent a54772835c
commit 6d91a2fe62
1 changed files with 5 additions and 0 deletions

View File

@ -278,6 +278,11 @@ cdef int calculate_score(sign_args, args, is_varargs=False) except *:
continue continue
return -1 return -1
# accept an autoclass class for java/lang/Class.
if hasattr(arg, '__javaclass__') and r == 'java/lang/Class':
score += 10
continue
# if we pass a JavaClass, ensure the definition is matching # if we pass a JavaClass, ensure the definition is matching
# XXX FIXME what if we use a subclass or something ? # XXX FIXME what if we use a subclass or something ?
if isinstance(arg, JavaClass): if isinstance(arg, JavaClass):