Add support of internal arguments for language feature settings

Arguments are passed in form '-XXLanguage:+LanguageFeatureName' for enabling
LanguageFeature.LanguageFeatureName, and '-XXLanguage:-LanguageFeatureName'
for disabling.

Note that they do override other settings, including 'language-version'
or extra ('-X') args.
This commit is contained in:
Dmitry Savvinov
2018-03-27 13:41:03 +03:00
parent ae119a09eb
commit c33b7377da
24 changed files with 346 additions and 23 deletions
@@ -0,0 +1,13 @@
warning: ATTENTION!
This build uses internal compiler arguments:
-XXLanguage:+SoundSmartCastsAfterTry
This mode is strictly prohibited for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
compiler/testData/cli/jvm/legacySmartCastsAfterTry.kt:8:9: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
some.length
^
COMPILATION_ERROR