Rename kotlin.reflect.IllegalAccessException -> IllegalPropertyAccessException
The former name clashes with java.lang.IllegalAccessException and proved to be inconvenient because it should always be qualified in the source. Also use java.lang exception's message as kotlin.reflect exception's message
This commit is contained in:
+3
-3
@@ -1,4 +1,4 @@
|
||||
import kotlin.reflect.IllegalAccessException
|
||||
import kotlin.reflect.IllegalPropertyAccessException
|
||||
import kotlin.reflect.KMemberProperty
|
||||
import kotlin.reflect.jvm.accessible
|
||||
|
||||
@@ -13,7 +13,7 @@ fun box(): String {
|
||||
try {
|
||||
p.get(Result())
|
||||
return "Fail: private property is accessible by default"
|
||||
} catch(e: IllegalAccessException) { }
|
||||
} catch(e: IllegalPropertyAccessException) { }
|
||||
|
||||
p.accessible = true
|
||||
|
||||
@@ -23,7 +23,7 @@ fun box(): String {
|
||||
try {
|
||||
p.get(Result())
|
||||
return "Fail: setAccessible(false) had no effect"
|
||||
} catch(e: IllegalAccessException) { }
|
||||
} catch(e: IllegalPropertyAccessException) { }
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user