JS: support -Xskip-metadata-version-check for incompatible ABI libraries
Allow the compiler to read such libraries without any errors, at the risk of crashing with an exception. Also fix a minor bug in the diagnostic message in LibrarySourcesConfig and in the corresponding test in KotlinJpsBuildTest
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
package a
|
||||
|
||||
open class A {
|
||||
class Nested
|
||||
|
||||
fun method() {}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
var bar = 42
|
||||
typealias TA = String
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
error: file '$TMP_DIR$/library.meta.js' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 42.0.0, expected version is 1.0.0
|
||||
COMPILATION_ERROR
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package usage
|
||||
|
||||
import a.*
|
||||
|
||||
fun baz(param: A, nested: A.Nested) {
|
||||
val constructor = A()
|
||||
val nested = A.Nested()
|
||||
val methodCall = param.method()
|
||||
val supertype = object : A() {}
|
||||
|
||||
val x = foo()
|
||||
val y = bar
|
||||
bar = 239
|
||||
val z: TA = ""
|
||||
}
|
||||
Reference in New Issue
Block a user