KJS: allow to use packages with names starting with "kotlin" only if the -Xallow-kotlin-package command line option is specified
#KT-14668 Fixed
This commit is contained in:
+1
@@ -2,6 +2,7 @@ Usage: kotlinc-js <options> <source files>
|
||||
where advanced options include:
|
||||
-Xno-inline Disable method inlining
|
||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
|
||||
-Xplugin <path> Load plugins from the given classpath
|
||||
-Xmulti-platform Enable experimental language support for multi-platform projects
|
||||
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/../kotlinPackage.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
compiler/testData/cli/kotlinPackage.kt:1:1: error: only the Kotlin standard library is allowed to use the 'kotlin' package
|
||||
package kotlin.mylibrary
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
+1
-1
@@ -5,7 +5,6 @@ where advanced options include:
|
||||
-Xno-optimize Disable optimizations
|
||||
-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 Load classes with bad metadata version anyway (incl. pre-release classes)
|
||||
-Xskip-runtime-version-check Allow Kotlin runtime libraries of incompatible versions in the classpath
|
||||
-Xdump-declarations-to <path> Path to JSON file to dump Java to Kotlin declaration mappings
|
||||
@@ -15,6 +14,7 @@ where advanced options include:
|
||||
Load definitions of built-in declarations from module dependencies, instead of from the compiler
|
||||
-Xno-inline Disable method inlining
|
||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
|
||||
-Xplugin <path> Load plugins from the given classpath
|
||||
-Xmulti-platform Enable experimental language support for multi-platform projects
|
||||
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
$TESTDATA_DIR$/kotlinPackage.kt
|
||||
$TESTDATA_DIR$/../kotlinPackage.kt
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/kotlinPackage.kt:1:1: error: only the Kotlin standard library is allowed to use the 'kotlin' package
|
||||
compiler/testData/cli/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