mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Add explanation why parenthesis is added after annotated expression
KTIJ-28468 kotlinOptions to compilerOptions inspection (kts only) GitOrigin-RevId: d2c83f809766e67aaf57b98de27cb7c5dcf1b143
This commit is contained in:
committed by
intellij-monorepo-bot
parent
67e0311e32
commit
e75f89a4f7
+8
-5
@@ -20,8 +20,11 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
<caret>kotlinOptions {
|
||||
@Suppress("SuspiciousCollectionReassignment")
|
||||
freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn")
|
||||
}
|
||||
tasks.withType<KotlinCompile> {
|
||||
<caret>kotlinOptions {
|
||||
@Suppress("SuspiciousCollectionReassignment")
|
||||
freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn")
|
||||
// KtExpressionImpl performs replaceExpression() and there calls KtPsiUtil.areParenthesesNecessary(). Inside, innerPriority is calculated
|
||||
// for DOT_QUALIFIED_EXPRESSION and it's 14, parentPriority is calculated for ANNOTATED_EXPRESSION is 15, and that's why () are added
|
||||
}
|
||||
}
|
||||
+7
-4
@@ -20,8 +20,11 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compilerOptions {
|
||||
@Suppress("SuspiciousCollectionReassignment")
|
||||
(freeCompilerArgs.addAll(listOf("-Xopt-in=kotlin.RequiresOptIn")))
|
||||
tasks.withType<KotlinCompile> {
|
||||
compilerOptions {
|
||||
@Suppress("SuspiciousCollectionReassignment")
|
||||
(freeCompilerArgs.addAll(listOf("-Xopt-in=kotlin.RequiresOptIn")))
|
||||
// KtExpressionImpl performs replaceExpression() and there calls KtPsiUtil.areParenthesesNecessary(). Inside, innerPriority is calculated
|
||||
// for DOT_QUALIFIED_EXPRESSION and it's 14, parentPriority is calculated for ANNOTATED_EXPRESSION is 15, and that's why () are added
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user