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:
Zalim Bashorov
2017-01-27 04:14:00 +03:00
parent 7195e26ae2
commit 29ac01f2e2
16 changed files with 84 additions and 30 deletions
+1
View File
@@ -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
View File
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/../kotlinPackage.kt
-no-stdlib
-output
$TEMP_DIR$/out.js
+4
View File
@@ -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