Support trailing comma
^KT-34743 Fixed
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
fun testParam(a : String, b : Int,
|
||||
<caret>) {
|
||||
<caret>) {
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
fun test() {
|
||||
testVeryLong(12,
|
||||
<caret>)
|
||||
<caret>)
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_PARAMETERS_IN_CALLS
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
fun test() {
|
||||
testVeryLong(12,
|
||||
<caret>)
|
||||
<caret>)
|
||||
}
|
||||
|
||||
// SET_TRUE: ALIGN_MULTILINE_PARAMETERS_IN_CALLS
|
||||
@@ -1,5 +1,6 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// 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'
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create property 'foo' as constructor parameter" "true"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// ERROR: No value passed for parameter 'foo'
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create property 'foo' as constructor parameter" "true"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// ERROR: No value passed for parameter 'foo'
|
||||
|
||||
class A<T>(val n: T, val foo: A<Int>)
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Create property 'foo' as constructor parameter" "true"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// ERROR: No value passed for parameter 'foo'
|
||||
|
||||
class A<T>(val n: T)
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// "Create property 'foo' as constructor parameter" "true"
|
||||
// ERROR: The feature "trailing commas" is only available since language version 1.4
|
||||
// ERROR: No value passed for parameter 'foo'
|
||||
|
||||
class A<T>(val n: T, var foo: String)
|
||||
|
||||
@@ -782,7 +782,7 @@ class TypedHandlerTest : LightCodeInsightTestCase() {
|
||||
"""
|
||||
|class A(
|
||||
| a: Int,
|
||||
| <caret>
|
||||
|<caret>
|
||||
|)
|
||||
""",
|
||||
enableSmartEnterWithTabs()
|
||||
@@ -800,7 +800,7 @@ class TypedHandlerTest : LightCodeInsightTestCase() {
|
||||
"""
|
||||
|fun method(
|
||||
| arg1: String,
|
||||
| <caret>
|
||||
|<caret>
|
||||
|) {}
|
||||
""",
|
||||
enableSmartEnterWithTabs()
|
||||
|
||||
Reference in New Issue
Block a user