Catch IllegalAccessException in KFunction.call
Rename IllegalPropertyAccessException -> IllegalCallableAccessException
This commit is contained in:
+2
-2
@@ -14,12 +14,12 @@ fun box(): String {
|
||||
try {
|
||||
f.get(a)
|
||||
return "Fail: protected property getter is accessible by default"
|
||||
} catch (e: IllegalPropertyAccessException) { }
|
||||
} catch (e: IllegalCallableAccessException) { }
|
||||
|
||||
try {
|
||||
f.set(a, ":D")
|
||||
return "Fail: protected property setter is accessible by default"
|
||||
} catch (e: IllegalPropertyAccessException) { }
|
||||
} catch (e: IllegalCallableAccessException) { }
|
||||
|
||||
f.isAccessible = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user