forbid compiling code in packages with names starting with 'kotlin' unless the -Xallow-kotlin-package command line option is specified
This commit is contained in:
+1
@@ -5,6 +5,7 @@ where advanced options include:
|
||||
-Xno-optimize Disable optimizations
|
||||
-Xreport-perf Report detailed performance statistics
|
||||
-Xmultifile-facades-open Compile multifile facade classes as open
|
||||
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
|
||||
-Xno-inline Disable method inlining
|
||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||
-Xplugin <path> Load plugins from the given classpath
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
$TESTDATA_DIR$/kotlinPackage.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package kotlin.mylibrary
|
||||
|
||||
class MyLibraryManager {
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
compiler/testData/cli/jvm/kotlinPackage.kt:1:1: error: only the Kotlin standard library is allowed to use the 'kotlin' package
|
||||
package kotlin.mylibrary
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user