Write "pre-release" flag to class files, do not allow usages in release
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
package a
|
||||
|
||||
open class A {
|
||||
class Nested
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCompilerAgainstPreReleaseLibrary/source.kt:6:23: error: class 'a.A' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
|
||||
val constructor = A()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCompilerAgainstPreReleaseLibrary/source.kt:7:20: error: class 'a.A.Nested' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
|
||||
val nested = A.Nested()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCompilerAgainstPreReleaseLibrary/source.kt:8:22: error: class 'a.A' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
|
||||
val methodCall = param.method()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCompilerAgainstPreReleaseLibrary/source.kt:8:28: error: unresolved reference: method
|
||||
val methodCall = param.method()
|
||||
^
|
||||
compiler/testData/compileKotlinAgainstCustomBinaries/releaseCompilerAgainstPreReleaseLibrary/source.kt:9:30: error: class 'a.A' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
|
||||
val supertype = object : A() {}
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
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() {}
|
||||
}
|
||||
Reference in New Issue
Block a user