mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[uast] UCatchClause made visit it's parameters (IDEA-234749)
GitOrigin-RevId: 41f4a33a28b45d63a8529dd832099d8df09df754
This commit is contained in:
committed by
intellij-monorepo-bot
parent
09965e3211
commit
9735198431
@@ -118,6 +118,7 @@ interface UCatchClause : UElement {
|
||||
|
||||
override fun accept(visitor: UastVisitor) {
|
||||
if (visitor.visitCatchClause(this)) return
|
||||
parameters.acceptList(visitor)
|
||||
body.accept(visitor)
|
||||
visitor.afterVisitCatchClause(this)
|
||||
}
|
||||
@@ -127,5 +128,5 @@ interface UCatchClause : UElement {
|
||||
|
||||
override fun asLogString(): String = log(parameters.joinToString { it.name })
|
||||
|
||||
override fun asRenderString(): String = "catch (e) " + body.asRenderString()
|
||||
override fun asRenderString(): String = "catch (${parameters.joinToString { it.asRenderString() }}) ${body.asRenderString()}"
|
||||
}
|
||||
@@ -25,6 +25,9 @@ public class TryCatch {
|
||||
catch (NumberFormatException ex) {
|
||||
b = 1;
|
||||
}
|
||||
catch (@Deprecated NullPointerException e){
|
||||
b = 2;
|
||||
}
|
||||
int c = b;
|
||||
}
|
||||
return sum;
|
||||
|
||||
@@ -31,10 +31,18 @@ UFile (package = )
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UCatchClause (ex)
|
||||
UParameter (name = ex)
|
||||
UBlockExpression
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
ULiteralExpression (value = 1)
|
||||
UCatchClause (e)
|
||||
UParameter (name = e)
|
||||
UAnnotation (fqName = java.lang.Deprecated)
|
||||
UBlockExpression
|
||||
UBinaryExpression (operator = =)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
ULiteralExpression (value = 2)
|
||||
UDeclarationsExpression
|
||||
ULocalVariable (name = c)
|
||||
USimpleNameReferenceExpression (identifier = b)
|
||||
|
||||
@@ -7,10 +7,13 @@ public class TryCatch {
|
||||
sum = sum + Integer.parseInt(part)
|
||||
b = 1
|
||||
}
|
||||
catch (e) {
|
||||
catch (var ex: java.lang.NumberFormatException) {
|
||||
b = 1
|
||||
}
|
||||
|
||||
catch (@java.lang.Deprecated var e: java.lang.NullPointerException) {
|
||||
b = 2
|
||||
}
|
||||
|
||||
var c: int = b
|
||||
}
|
||||
return sum
|
||||
|
||||
@@ -30,11 +30,19 @@ UFile (package = ) [public class TryCatch {...]
|
||||
UBinaryExpression (operator = =) [b = 1] = 1
|
||||
USimpleNameReferenceExpression (identifier = b) [b] = (var b = 0)
|
||||
ULiteralExpression (value = 1) [1] = 1
|
||||
UCatchClause (ex) [catch (e) {...}]
|
||||
UCatchClause (ex) [catch (var ex: java.lang.NumberFormatException) {...}]
|
||||
UParameter (name = ex) [var ex: java.lang.NumberFormatException]
|
||||
UBlockExpression [{...}] = 1
|
||||
UBinaryExpression (operator = =) [b = 1] = 1
|
||||
USimpleNameReferenceExpression (identifier = b) [b] = Undetermined
|
||||
ULiteralExpression (value = 1) [1] = 1
|
||||
UCatchClause (e) [catch (@java.lang.Deprecated var e: java.lang.NullPointerException) {...}]
|
||||
UParameter (name = e) [@java.lang.Deprecated var e: java.lang.NullPointerException]
|
||||
UAnnotation (fqName = java.lang.Deprecated) [@java.lang.Deprecated]
|
||||
UBlockExpression [{...}] = 2
|
||||
UBinaryExpression (operator = =) [b = 2] = 2
|
||||
USimpleNameReferenceExpression (identifier = b) [b] = Undetermined
|
||||
ULiteralExpression (value = 2) [2] = 2
|
||||
UDeclarationsExpression [var c: int = b] = Undetermined
|
||||
ULocalVariable (name = c) [var c: int = b]
|
||||
USimpleNameReferenceExpression (identifier = b) [b] = (var b = Phi(1, 0))
|
||||
|
||||
Reference in New Issue
Block a user