Rework notForIncompletionCall test
This commit is contained in:
committed by
Victor Petukhov
parent
ba93bdb14d
commit
cf161f8234
@@ -0,0 +1,19 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Type mismatch: inferred type is Int but String was expected
|
||||
// ACTION: Add 'toString()' call
|
||||
// ACTION: Change parameter 'p' type of function 'foo' to 'Int'
|
||||
// ACTION: Create function 'foo'
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+TrailingCommas
|
||||
|
||||
package main
|
||||
|
||||
import other.foo
|
||||
|
||||
class X {
|
||||
fun foo(p: String) {
|
||||
}
|
||||
|
||||
fun f(p: Int) {
|
||||
foo(<selection><caret></selection>p, )
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Import" "true"
|
||||
// ERROR: Type mismatch: inferred type is Int but String was expected
|
||||
// ACTION: Add 'toString()' call
|
||||
// ACTION: Change parameter 'p' type of function 'foo' to 'Int'
|
||||
// ACTION: Create function 'foo'
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+TrailingCommas
|
||||
|
||||
package other
|
||||
|
||||
import main.X
|
||||
|
||||
fun X.foo(p: Int) {
|
||||
}
|
||||
+2
-11
@@ -1,10 +1,9 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// "Import" "true"
|
||||
// ERROR: Type mismatch: inferred type is Int but String was expected
|
||||
// ACTION: Add 'toString()' call
|
||||
// ACTION: Change parameter 'p' type of function 'foo' to 'Int'
|
||||
// ACTION: Create function 'foo'
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+TrailingCommas
|
||||
|
||||
package main
|
||||
|
||||
@@ -16,11 +15,3 @@ class X {
|
||||
foo(<caret>p, )
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
package other
|
||||
|
||||
import main.X
|
||||
|
||||
fun X.foo(p: Int) {
|
||||
}
|
||||
+5
-5
@@ -515,6 +515,11 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes
|
||||
runTest("idea/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callWithTrailingComma.before.Main.kt")
|
||||
public void testCallWithTrailingComma() throws Exception {
|
||||
runTest("idea/testData/quickfix/autoImports/callWithTrailingComma.before.Main.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("callableReferenceExtension.before.Main.kt")
|
||||
public void testCallableReferenceExtension() throws Exception {
|
||||
runTest("idea/testData/quickfix/autoImports/callableReferenceExtension.before.Main.kt");
|
||||
@@ -1140,11 +1145,6 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes
|
||||
runTest("idea/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test");
|
||||
}
|
||||
|
||||
@TestMetadata("notForIncompleteCall.test")
|
||||
public void testNotForIncompleteCall() throws Exception {
|
||||
runTest("idea/testData/quickfix/autoImports/mismatchingArgs/notForIncompleteCall.test");
|
||||
}
|
||||
|
||||
@TestMetadata("smartCast.test")
|
||||
public void testSmartCast() throws Exception {
|
||||
runTest("idea/testData/quickfix/autoImports/mismatchingArgs/smartCast.test");
|
||||
|
||||
Reference in New Issue
Block a user