Pair parenthesis before end of string template
#KT-6403 Fixed
This commit is contained in:
@@ -54,7 +54,8 @@ public class JetPairMatcher implements PairedBraceMatcher {
|
|||||||
|| contextType == JetTokens.RPAR
|
|| contextType == JetTokens.RPAR
|
||||||
|| contextType == JetTokens.RBRACKET
|
|| contextType == JetTokens.RBRACKET
|
||||||
|| contextType == JetTokens.RBRACE
|
|| contextType == JetTokens.RBRACE
|
||||||
|| contextType == JetTokens.LBRACE;
|
|| contextType == JetTokens.LBRACE
|
||||||
|
|| contextType == JetTokens.LONG_TEMPLATE_ENTRY_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -222,6 +222,18 @@ public class TypedHandlerTest : LightCodeInsightTestCase() {
|
|||||||
"}"
|
"}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
public fun testAutoInsertParenInStringLiteral(): Unit = doCharTypeTest(
|
||||||
|
'(',
|
||||||
|
"""fun f() { println("$amp{f<caret>}") }""",
|
||||||
|
"""fun f() { println("$amp{f(<caret>)}") }"""
|
||||||
|
)
|
||||||
|
|
||||||
|
public fun testAutoInsertParenInCode(): Unit = doCharTypeTest(
|
||||||
|
'(',
|
||||||
|
"""fun f() { val a = f<caret> }""",
|
||||||
|
"""fun f() { val a = f(<caret>) }"""
|
||||||
|
)
|
||||||
|
|
||||||
public fun testTypeLtInFunDeclaration() {
|
public fun testTypeLtInFunDeclaration() {
|
||||||
doLtGtTest("fun <caret>")
|
doLtGtTest("fun <caret>")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user