Report "declaration should be marked with impl" when possible
Also support a quick fix to add 'impl' modifier (KT-18454), although it doesn't work yet on classes because there's no error on them in the IDE #KT-18087 Fixed #KT-18452 Fixed #KT-18454
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
header fun foo(s: String): Array<CharSequence?>
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
fun foo(s: String): Array<CharSequence?> = arrayOf(s)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/jvm.kt:3:1: error: declaration should be marked with 'impl' (suppress with -Xno-check-impl)
|
||||
fun foo(s: String): Array<CharSequence?> = arrayOf(s)
|
||||
^
|
||||
Reference in New Issue
Block a user