Use "-Xskip-metadata-version-check" to load pre-release classes

This commit is contained in:
Alexander Udalov
2016-12-06 19:54:36 +03:00
parent 7de0cfde16
commit d204fa91cc
7 changed files with 42 additions and 5 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ where advanced options include:
-Xreport-perf Report detailed performance statistics
-Xmultifile-parts-inherit Compile multifile classes as a hierarchy of parts and facade
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
-Xskip-metadata-version-check Try loading binary incompatible classes, may cause crashes
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
-Xdump-declarations-to <path> Path to JSON file to dump Java to Kotlin declaration mappings
-Xsingle-module Combine modules for source files and binary dependencies into a single module
-Xadd-compiler-builtins Add definitions of built-in declarations to the compilation classpath (useful with -no-stdlib)
@@ -0,0 +1,9 @@
package a
open class A {
class Nested
}
fun foo() {}
var bar = 42
typealias TA = String
@@ -0,0 +1,15 @@
@file:Suppress("UNUSED_VARIABLE")
package usage
import a.*
fun baz(param: A) {
val constructor = A()
val methodCall = param.hashCode()
val supertype = object : A() {}
val x = foo()
val y = bar
bar = 239
val z: TA = ""
}