mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
also remove some tests that are covered in the scripting-compiler tests now. Part of the cleanup to rewrite scripting to the new infrastructure.
15 lines
458 B
Kotlin
Vendored
15 lines
458 B
Kotlin
Vendored
fun checkInaccessible(name: String) {
|
|
try {
|
|
Class.forName(name)
|
|
throw AssertionError("Class should not be accessible from script via the class loader: $name")
|
|
}
|
|
catch (e: ClassNotFoundException) {
|
|
// OK
|
|
}
|
|
}
|
|
|
|
checkInaccessible("org.jetbrains.kotlin.config.KotlinCompilerVersion")
|
|
checkInaccessible("org.jetbrains.kotlin.cli.jvm.K2JVMCompiler")
|
|
checkInaccessible("org.jetbrains.kotlin.preloading.Preloader")
|
|
print("OK")
|