Skip to content

Commit

Permalink
[CLI] Don't suggest enabling test-only features
Browse files Browse the repository at this point in the history
This commit changes the error message from:
    main.kt:2:11: error: the feature "references to synthetic java properties" is experimental and should be enabled explicitly. This can be done by supplying the compiler argument '-XXLanguage:+ReferencesToSyntheticJavaProperties', but note that no stability guarantees are provided.

to
    main.kt:2:11: error: the feature "references to synthetic java properties" is unsupported.
  • Loading branch information
nikitabobko authored and Space Team committed Feb 13, 2025
1 parent 66e54d8 commit ac7269a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class LanguageFeatureMessageRenderer @JvmOverloads constructor(
when {
settings.supportsFeature(feature) && settings.languageVersion < LanguageVersion.KOTLIN_2_0 ->
sb.append("not supported in language versions 1.*, please use version 2.0 or later")
feature.kind.testOnly ->
sb.append("unsupported.")
since == null ->
sb.append("experimental and should be enabled explicitly. This can be done by supplying the compiler argument '$featureFlag', but note that no stability guarantees are provided.")
since > settings.languageVersion ->
Expand Down

0 comments on commit ac7269a

Please sign in to comment.