Add "Remove argument" quick fix for TOO_MANY_ARGUMENTS

#KT-34026 Fixed
#KT-34332 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-13 08:48:04 +01:00
committed by Vladimir Dolzhenko
parent 13afb2e45e
commit d54a35ef56
16 changed files with 187 additions and 0 deletions
@@ -4,6 +4,7 @@
// ACTION: Create secondary constructor
// ERROR: Too many arguments for public constructor Foo(a: Int) defined in Foo
// ACTION: Put arguments on separate lines
// ACTION: Remove argument
// ACTION: To raw string literal
class Foo(a: Int)
@@ -1,6 +1,7 @@
// "Create secondary constructor" "false"
// ACTION: Add parameter to constructor 'A'
// ACTION: Create function 'A'
// ACTION: Remove argument
// ERROR: No type arguments expected for constructor A()
// ERROR: Too many arguments for public constructor A() defined in A
@@ -1,6 +1,7 @@
// "Create secondary constructor" "false"
// ERROR: Too many arguments for public constructor Any() defined in kotlin.Any
// WITH_RUNTIME
// ACTION: Remove argument
interface T {
@@ -2,6 +2,7 @@
// ACTION: Add parameter to constructor 'A'
// ACTION: Change type of 'b' to 'A'
// ACTION: Create function 'A'
// ACTION: Remove argument
// ERROR: Type mismatch: inferred type is A but B was expected
// ERROR: Too many arguments for public constructor A() defined in A