Suggest assert/return postfix templates only for statements
#KT-14079 Fixed #KT-14090 Fixed
This commit is contained in:
+2
-2
@@ -63,7 +63,7 @@ internal object KtAssertPostfixTemplate : ConstantStringBasedPostfixTemplate(
|
||||
"assert",
|
||||
"assert(expr) { \"\" }",
|
||||
"assert(\$expr$) { \"\$END$\" }",
|
||||
createExpressionSelector(statementsOnly = false, predicate = KotlinType::isBoolean)
|
||||
createExpressionSelector(statementsOnly = true, predicate = KotlinType::isBoolean)
|
||||
)
|
||||
|
||||
internal object KtParenthesizedPostfixTemplate : ConstantStringBasedPostfixTemplate(
|
||||
@@ -83,7 +83,7 @@ internal object KtReturnPostfixTemplate : ConstantStringBasedPostfixTemplate(
|
||||
"return",
|
||||
"return expr",
|
||||
"return \$expr$\$END$",
|
||||
createExpressionSelector(statementsOnly = false)
|
||||
createExpressionSelector(statementsOnly = true)
|
||||
)
|
||||
|
||||
internal object KtWhilePostfixTemplate : ConstantStringBasedPostfixTemplate(
|
||||
|
||||
Reference in New Issue
Block a user