Transpiled version (30440L) is out of date.
1 | please include function plus. |
2 | |
3 | svoid test_lasTypeSpecialization() { |
4 | new GazelleV_LeftArrowScriptParser parser; |
5 | parser.allowTheWorld(); |
6 | parser.addVar("i", new LASValueDescriptor.Exact(int.class, false)); |
7 | var script = parser.parse("plus i i"); |
8 | printIndentedStruct(script); |
9 | var step = first(script.steps); |
10 | print(returnType := step.returnType()); |
11 | var opt = step.optimize(); |
12 | print(optimized := opt); |
13 | assertInstanceOf(opt, GazelleV_LeftArrowScript.DirectMethodCallOnKnownTarget.class); |
14 | print(returnType := opt.returnType()); |
15 | |
16 | new FlexibleVarContext ctx; |
17 | ctx.put(i := 5); |
18 | assertEqualsVerbose(10, opt.get(ctx)); |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034321 |
Snippet name: | test_lasTypeSpecialization |
Eternal ID of this version: | #1034321/2 |
Text MD5: | b6d40b795b227cac7c94139246bfbfd6 |
Author: | stefan |
Category: | javax / left arrow script |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-28 22:46:53 |
Source code size: | 653 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 202 |
Version history: | 1 change(s) |
Referenced in: | [show references] |