Skip to content

Commit eb97735

Browse files
authored
Merge pull request github#10797 from smowton/smowton/fix/byte-short-inversion
Kotlin: fix bit-inversion operator for Byte and Short types
2 parents e1c93c9 + efd7b6e commit eb97735

File tree

6 files changed

+689
-76
lines changed

6 files changed

+689
-76
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,10 @@ open class KotlinFileExtractor(
24492449
}
24502450
}
24512451
tw.writeExprsKotlinType(id, type.kotlinResult.id)
2452-
unaryopDisp(id)
2452+
if (isFunction(target, "kotlin", "Byte or Short", { it == "Byte" || it == "Short" }, "inv"))
2453+
unaryopReceiver(id, c.extensionReceiver, "Extension receiver")
2454+
else
2455+
unaryopDisp(id)
24532456
}
24542457
// We need to handle all the builtin operators defines in BuiltInOperatorNames in
24552458
// compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrBuiltIns.kt

java/ql/test/kotlin/library-tests/exprs/CONSISTENCY/javaEquivalent.expected

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.dec in java.lang.Byte |
2+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.dec in java.lang.Byte |
3+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.dec in java.lang.Byte |
4+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.dec in java.lang.Byte |
5+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.inc in java.lang.Byte |
6+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.inc in java.lang.Byte |
7+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.inc in java.lang.Byte |
8+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.inc in java.lang.Byte |
19
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
210
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
311
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
@@ -21,6 +29,22 @@
2129
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.inc in java.lang.Integer |
2230
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.rangeTo in java.lang.Integer |
2331
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.rangeTo in java.lang.Integer |
32+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.dec in java.lang.Long |
33+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.dec in java.lang.Long |
34+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.dec in java.lang.Long |
35+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.dec in java.lang.Long |
36+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.inc in java.lang.Long |
37+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.inc in java.lang.Long |
38+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.inc in java.lang.Long |
39+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Long.inc in java.lang.Long |
40+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.dec in java.lang.Short |
41+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.dec in java.lang.Short |
42+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.dec in java.lang.Short |
43+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.dec in java.lang.Short |
44+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.inc in java.lang.Short |
45+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.inc in java.lang.Short |
46+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.inc in java.lang.Short |
47+
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.inc in java.lang.Short |
2448
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
2549
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
2650
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |

java/ql/test/kotlin/library-tests/exprs/PrintAst.expected

Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,6 +2862,14 @@ exprs.kt:
28622862
# 279| 0: [TypeAccess] int
28632863
# 279| 1: [Parameter] d
28642864
# 279| 0: [TypeAccess] double
2865+
# 279| 2: [Parameter] b
2866+
# 279| 0: [TypeAccess] byte
2867+
# 279| 3: [Parameter] s
2868+
# 279| 0: [TypeAccess] short
2869+
# 279| 4: [Parameter] l
2870+
# 279| 0: [TypeAccess] long
2871+
# 279| 5: [Parameter] f
2872+
# 279| 0: [TypeAccess] float
28652873
# 279| 5: [BlockStmt] { ... }
28662874
# 280| 0: [ExprStmt] <Expr>;
28672875
# 280| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
@@ -2963,6 +2971,306 @@ exprs.kt:
29632971
# 293| 0: [TypeAccess] Unit
29642972
# 293| 1: [MethodAccess] dec(...)
29652973
# 293| -1: [VarAccess] i1
2974+
# 294| 14: [ExprStmt] <Expr>;
2975+
# 294| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
2976+
# 294| 0: [TypeAccess] Unit
2977+
# 294| 1: [BitNotExpr] ~...
2978+
# 294| 0: [VarAccess] i
2979+
# 296| 15: [ExprStmt] <Expr>;
2980+
# 296| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
2981+
# 296| 0: [TypeAccess] Unit
2982+
# 296| 1: [MinusExpr] -...
2983+
# 296| 0: [VarAccess] b
2984+
# 297| 16: [ExprStmt] <Expr>;
2985+
# 297| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
2986+
# 297| 0: [TypeAccess] Unit
2987+
# 297| 1: [PlusExpr] +...
2988+
# 297| 0: [VarAccess] b
2989+
# 298| 17: [LocalVariableDeclStmt] var ...;
2990+
# 298| 1: [LocalVariableDeclExpr] b0
2991+
# 298| 0: [IntegerLiteral] 1
2992+
# 299| 18: [LocalVariableDeclStmt] var ...;
2993+
# 299| 1: [LocalVariableDeclExpr] b1
2994+
# 299| 0: [IntegerLiteral] 1
2995+
# 300| 19: [ExprStmt] <Expr>;
2996+
# 300| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
2997+
# 300| 0: [TypeAccess] Unit
2998+
# 300| 1: [StmtExpr] <Stmt>
2999+
# 300| 0: [BlockStmt] { ... }
3000+
# 300| 0: [LocalVariableDeclStmt] var ...;
3001+
# 300| 1: [LocalVariableDeclExpr] tmp2
3002+
# 300| 0: [VarAccess] b0
3003+
# 300| 1: [ExprStmt] <Expr>;
3004+
# 300| 0: [AssignExpr] ...=...
3005+
# 300| 0: [VarAccess] b0
3006+
# 300| 1: [MethodAccess] inc(...)
3007+
# 300| -1: [VarAccess] tmp2
3008+
# 300| 2: [ExprStmt] <Expr>;
3009+
# 300| 0: [VarAccess] tmp2
3010+
# 301| 20: [ExprStmt] <Expr>;
3011+
# 301| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3012+
# 301| 0: [TypeAccess] Unit
3013+
# 301| 1: [StmtExpr] <Stmt>
3014+
# 301| 0: [BlockStmt] { ... }
3015+
# 301| 0: [ExprStmt] <Expr>;
3016+
# 301| 0: [AssignExpr] ...=...
3017+
# 301| 0: [VarAccess] b0
3018+
# 301| 1: [MethodAccess] inc(...)
3019+
# 301| -1: [VarAccess] b0
3020+
# 301| 1: [ExprStmt] <Expr>;
3021+
# 301| 0: [VarAccess] b0
3022+
# 302| 21: [ExprStmt] <Expr>;
3023+
# 302| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3024+
# 302| 0: [TypeAccess] Unit
3025+
# 302| 1: [StmtExpr] <Stmt>
3026+
# 302| 0: [BlockStmt] { ... }
3027+
# 302| 0: [LocalVariableDeclStmt] var ...;
3028+
# 302| 1: [LocalVariableDeclExpr] tmp3
3029+
# 302| 0: [VarAccess] b0
3030+
# 302| 1: [ExprStmt] <Expr>;
3031+
# 302| 0: [AssignExpr] ...=...
3032+
# 302| 0: [VarAccess] b0
3033+
# 302| 1: [MethodAccess] dec(...)
3034+
# 302| -1: [VarAccess] tmp3
3035+
# 302| 2: [ExprStmt] <Expr>;
3036+
# 302| 0: [VarAccess] tmp3
3037+
# 303| 22: [ExprStmt] <Expr>;
3038+
# 303| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3039+
# 303| 0: [TypeAccess] Unit
3040+
# 303| 1: [StmtExpr] <Stmt>
3041+
# 303| 0: [BlockStmt] { ... }
3042+
# 303| 0: [ExprStmt] <Expr>;
3043+
# 303| 0: [AssignExpr] ...=...
3044+
# 303| 0: [VarAccess] b0
3045+
# 303| 1: [MethodAccess] dec(...)
3046+
# 303| -1: [VarAccess] b0
3047+
# 303| 1: [ExprStmt] <Expr>;
3048+
# 303| 0: [VarAccess] b0
3049+
# 304| 23: [ExprStmt] <Expr>;
3050+
# 304| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3051+
# 304| 0: [TypeAccess] Unit
3052+
# 304| 1: [MethodAccess] inc(...)
3053+
# 304| -1: [VarAccess] b0
3054+
# 305| 24: [ExprStmt] <Expr>;
3055+
# 305| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3056+
# 305| 0: [TypeAccess] Unit
3057+
# 305| 1: [MethodAccess] dec(...)
3058+
# 305| -1: [VarAccess] b0
3059+
# 306| 25: [ExprStmt] <Expr>;
3060+
# 306| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3061+
# 306| 0: [TypeAccess] Unit
3062+
# 306| 1: [MethodAccess] inc(...)
3063+
# 306| -1: [VarAccess] b1
3064+
# 307| 26: [ExprStmt] <Expr>;
3065+
# 307| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3066+
# 307| 0: [TypeAccess] Unit
3067+
# 307| 1: [MethodAccess] dec(...)
3068+
# 307| -1: [VarAccess] b1
3069+
# 308| 27: [ExprStmt] <Expr>;
3070+
# 308| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3071+
# 308| 0: [TypeAccess] Unit
3072+
# 308| 1: [BitNotExpr] ~...
3073+
# 308| 0: [VarAccess] b
3074+
# 310| 28: [ExprStmt] <Expr>;
3075+
# 310| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3076+
# 310| 0: [TypeAccess] Unit
3077+
# 310| 1: [MinusExpr] -...
3078+
# 310| 0: [VarAccess] s
3079+
# 311| 29: [ExprStmt] <Expr>;
3080+
# 311| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3081+
# 311| 0: [TypeAccess] Unit
3082+
# 311| 1: [PlusExpr] +...
3083+
# 311| 0: [VarAccess] s
3084+
# 312| 30: [LocalVariableDeclStmt] var ...;
3085+
# 312| 1: [LocalVariableDeclExpr] s0
3086+
# 312| 0: [IntegerLiteral] 1
3087+
# 313| 31: [LocalVariableDeclStmt] var ...;
3088+
# 313| 1: [LocalVariableDeclExpr] s1
3089+
# 313| 0: [IntegerLiteral] 1
3090+
# 314| 32: [ExprStmt] <Expr>;
3091+
# 314| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3092+
# 314| 0: [TypeAccess] Unit
3093+
# 314| 1: [StmtExpr] <Stmt>
3094+
# 314| 0: [BlockStmt] { ... }
3095+
# 314| 0: [LocalVariableDeclStmt] var ...;
3096+
# 314| 1: [LocalVariableDeclExpr] tmp4
3097+
# 314| 0: [VarAccess] s0
3098+
# 314| 1: [ExprStmt] <Expr>;
3099+
# 314| 0: [AssignExpr] ...=...
3100+
# 314| 0: [VarAccess] s0
3101+
# 314| 1: [MethodAccess] inc(...)
3102+
# 314| -1: [VarAccess] tmp4
3103+
# 314| 2: [ExprStmt] <Expr>;
3104+
# 314| 0: [VarAccess] tmp4
3105+
# 315| 33: [ExprStmt] <Expr>;
3106+
# 315| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3107+
# 315| 0: [TypeAccess] Unit
3108+
# 315| 1: [StmtExpr] <Stmt>
3109+
# 315| 0: [BlockStmt] { ... }
3110+
# 315| 0: [ExprStmt] <Expr>;
3111+
# 315| 0: [AssignExpr] ...=...
3112+
# 315| 0: [VarAccess] s0
3113+
# 315| 1: [MethodAccess] inc(...)
3114+
# 315| -1: [VarAccess] s0
3115+
# 315| 1: [ExprStmt] <Expr>;
3116+
# 315| 0: [VarAccess] s0
3117+
# 316| 34: [ExprStmt] <Expr>;
3118+
# 316| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3119+
# 316| 0: [TypeAccess] Unit
3120+
# 316| 1: [StmtExpr] <Stmt>
3121+
# 316| 0: [BlockStmt] { ... }
3122+
# 316| 0: [LocalVariableDeclStmt] var ...;
3123+
# 316| 1: [LocalVariableDeclExpr] tmp5
3124+
# 316| 0: [VarAccess] s0
3125+
# 316| 1: [ExprStmt] <Expr>;
3126+
# 316| 0: [AssignExpr] ...=...
3127+
# 316| 0: [VarAccess] s0
3128+
# 316| 1: [MethodAccess] dec(...)
3129+
# 316| -1: [VarAccess] tmp5
3130+
# 316| 2: [ExprStmt] <Expr>;
3131+
# 316| 0: [VarAccess] tmp5
3132+
# 317| 35: [ExprStmt] <Expr>;
3133+
# 317| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3134+
# 317| 0: [TypeAccess] Unit
3135+
# 317| 1: [StmtExpr] <Stmt>
3136+
# 317| 0: [BlockStmt] { ... }
3137+
# 317| 0: [ExprStmt] <Expr>;
3138+
# 317| 0: [AssignExpr] ...=...
3139+
# 317| 0: [VarAccess] s0
3140+
# 317| 1: [MethodAccess] dec(...)
3141+
# 317| -1: [VarAccess] s0
3142+
# 317| 1: [ExprStmt] <Expr>;
3143+
# 317| 0: [VarAccess] s0
3144+
# 318| 36: [ExprStmt] <Expr>;
3145+
# 318| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3146+
# 318| 0: [TypeAccess] Unit
3147+
# 318| 1: [MethodAccess] inc(...)
3148+
# 318| -1: [VarAccess] s0
3149+
# 319| 37: [ExprStmt] <Expr>;
3150+
# 319| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3151+
# 319| 0: [TypeAccess] Unit
3152+
# 319| 1: [MethodAccess] dec(...)
3153+
# 319| -1: [VarAccess] s0
3154+
# 320| 38: [ExprStmt] <Expr>;
3155+
# 320| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3156+
# 320| 0: [TypeAccess] Unit
3157+
# 320| 1: [MethodAccess] inc(...)
3158+
# 320| -1: [VarAccess] s1
3159+
# 321| 39: [ExprStmt] <Expr>;
3160+
# 321| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3161+
# 321| 0: [TypeAccess] Unit
3162+
# 321| 1: [MethodAccess] dec(...)
3163+
# 321| -1: [VarAccess] s1
3164+
# 322| 40: [ExprStmt] <Expr>;
3165+
# 322| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3166+
# 322| 0: [TypeAccess] Unit
3167+
# 322| 1: [BitNotExpr] ~...
3168+
# 322| 0: [VarAccess] s
3169+
# 324| 41: [ExprStmt] <Expr>;
3170+
# 324| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3171+
# 324| 0: [TypeAccess] Unit
3172+
# 324| 1: [MinusExpr] -...
3173+
# 324| 0: [VarAccess] l
3174+
# 325| 42: [ExprStmt] <Expr>;
3175+
# 325| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3176+
# 325| 0: [TypeAccess] Unit
3177+
# 325| 1: [PlusExpr] +...
3178+
# 325| 0: [VarAccess] l
3179+
# 326| 43: [LocalVariableDeclStmt] var ...;
3180+
# 326| 1: [LocalVariableDeclExpr] l0
3181+
# 326| 0: [LongLiteral] 1
3182+
# 327| 44: [LocalVariableDeclStmt] var ...;
3183+
# 327| 1: [LocalVariableDeclExpr] l1
3184+
# 327| 0: [LongLiteral] 1
3185+
# 328| 45: [ExprStmt] <Expr>;
3186+
# 328| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3187+
# 328| 0: [TypeAccess] Unit
3188+
# 328| 1: [StmtExpr] <Stmt>
3189+
# 328| 0: [BlockStmt] { ... }
3190+
# 328| 0: [LocalVariableDeclStmt] var ...;
3191+
# 328| 1: [LocalVariableDeclExpr] tmp6
3192+
# 328| 0: [VarAccess] l0
3193+
# 328| 1: [ExprStmt] <Expr>;
3194+
# 328| 0: [AssignExpr] ...=...
3195+
# 328| 0: [VarAccess] l0
3196+
# 328| 1: [MethodAccess] inc(...)
3197+
# 328| -1: [VarAccess] tmp6
3198+
# 328| 2: [ExprStmt] <Expr>;
3199+
# 328| 0: [VarAccess] tmp6
3200+
# 329| 46: [ExprStmt] <Expr>;
3201+
# 329| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3202+
# 329| 0: [TypeAccess] Unit
3203+
# 329| 1: [StmtExpr] <Stmt>
3204+
# 329| 0: [BlockStmt] { ... }
3205+
# 329| 0: [ExprStmt] <Expr>;
3206+
# 329| 0: [AssignExpr] ...=...
3207+
# 329| 0: [VarAccess] l0
3208+
# 329| 1: [MethodAccess] inc(...)
3209+
# 329| -1: [VarAccess] l0
3210+
# 329| 1: [ExprStmt] <Expr>;
3211+
# 329| 0: [VarAccess] l0
3212+
# 330| 47: [ExprStmt] <Expr>;
3213+
# 330| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3214+
# 330| 0: [TypeAccess] Unit
3215+
# 330| 1: [StmtExpr] <Stmt>
3216+
# 330| 0: [BlockStmt] { ... }
3217+
# 330| 0: [LocalVariableDeclStmt] var ...;
3218+
# 330| 1: [LocalVariableDeclExpr] tmp7
3219+
# 330| 0: [VarAccess] l0
3220+
# 330| 1: [ExprStmt] <Expr>;
3221+
# 330| 0: [AssignExpr] ...=...
3222+
# 330| 0: [VarAccess] l0
3223+
# 330| 1: [MethodAccess] dec(...)
3224+
# 330| -1: [VarAccess] tmp7
3225+
# 330| 2: [ExprStmt] <Expr>;
3226+
# 330| 0: [VarAccess] tmp7
3227+
# 331| 48: [ExprStmt] <Expr>;
3228+
# 331| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3229+
# 331| 0: [TypeAccess] Unit
3230+
# 331| 1: [StmtExpr] <Stmt>
3231+
# 331| 0: [BlockStmt] { ... }
3232+
# 331| 0: [ExprStmt] <Expr>;
3233+
# 331| 0: [AssignExpr] ...=...
3234+
# 331| 0: [VarAccess] l0
3235+
# 331| 1: [MethodAccess] dec(...)
3236+
# 331| -1: [VarAccess] l0
3237+
# 331| 1: [ExprStmt] <Expr>;
3238+
# 331| 0: [VarAccess] l0
3239+
# 332| 49: [ExprStmt] <Expr>;
3240+
# 332| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3241+
# 332| 0: [TypeAccess] Unit
3242+
# 332| 1: [MethodAccess] inc(...)
3243+
# 332| -1: [VarAccess] l0
3244+
# 333| 50: [ExprStmt] <Expr>;
3245+
# 333| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3246+
# 333| 0: [TypeAccess] Unit
3247+
# 333| 1: [MethodAccess] dec(...)
3248+
# 333| -1: [VarAccess] l0
3249+
# 334| 51: [ExprStmt] <Expr>;
3250+
# 334| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3251+
# 334| 0: [TypeAccess] Unit
3252+
# 334| 1: [MethodAccess] inc(...)
3253+
# 334| -1: [VarAccess] l1
3254+
# 335| 52: [ExprStmt] <Expr>;
3255+
# 335| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3256+
# 335| 0: [TypeAccess] Unit
3257+
# 335| 1: [MethodAccess] dec(...)
3258+
# 335| -1: [VarAccess] l1
3259+
# 336| 53: [ExprStmt] <Expr>;
3260+
# 336| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3261+
# 336| 0: [TypeAccess] Unit
3262+
# 336| 1: [BitNotExpr] ~...
3263+
# 336| 0: [VarAccess] l
3264+
# 338| 54: [ExprStmt] <Expr>;
3265+
# 338| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3266+
# 338| 0: [TypeAccess] Unit
3267+
# 338| 1: [PlusExpr] +...
3268+
# 338| 0: [VarAccess] f
3269+
# 339| 55: [ExprStmt] <Expr>;
3270+
# 339| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
3271+
# 339| 0: [TypeAccess] Unit
3272+
# 339| 1: [MinusExpr] -...
3273+
# 339| 0: [VarAccess] f
29663274
# 142| 2: [Class] C
29673275
# 142| 1: [Constructor] C
29683276
#-----| 4: (Parameters)

0 commit comments

Comments
 (0)