CLI: improve behavior of -include-runtime
1.fix KT-17344: Include kotlin-reflect to resulting jar if "-include-runtime" is specified, unless the -no-reflect option is specified. 2.fix KT-43220: -include-runtime should add .kotlin_builtins to the output
This commit is contained in:
committed by
Alexander Udalov
parent
496d857db1
commit
bd205317aa
@@ -0,0 +1,6 @@
|
||||
ERR:
|
||||
noReflect.kt:5:23: warning: call uses reflection API which is not found in compilation classpath. Make sure you have kotlin-reflect.jar in the classpath
|
||||
String::class.annotations
|
||||
^
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1,9 @@
|
||||
package noReflect
|
||||
|
||||
fun main() {
|
||||
try {
|
||||
String::class.annotations
|
||||
} catch (e: KotlinReflectionNotSupportedError) {
|
||||
println("KotlinReflectionNotSupportedError has been caught")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
OUT:
|
||||
KotlinReflectionNotSupportedError has been caught
|
||||
|
||||
Return code: 0
|
||||
@@ -0,0 +1 @@
|
||||
Return code: 0
|
||||
@@ -0,0 +1,5 @@
|
||||
package reflect
|
||||
|
||||
fun main() {
|
||||
String::class.annotations
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Return code: 0
|
||||
Reference in New Issue
Block a user