Libraryless. Click here for Pure Java version (6073L/37K).
scope test_structure_with_thisDollar0. sclass Y { sclass X { O this$0; S abc = "abc"; *(Y *this$0) {} } sclass X2 { O this$1; S abc = "abc"; *(Y *this$1) {} } } svoid test_structure_with_thisDollar0() { S s = structure(new Y.X(new Y)); assertEqualsVerbose("Y$X(this$0=Y, abc=\"abc\")", s); Y.X x = cast unstructure(s); assertTrueVerbose(x.this$0 instanceof Y); assertEqualsVerbose("abc", x.abc); // test translation from this$1 to this$0 x = (Y.X) unstructure("Y$X(this$1=Y, abc=\"abc\")"); assertTrueVerbose(x.this$0 instanceof Y); assertEqualsVerbose("abc", x.abc); // test translation from this$ß to this$1 Y.X2 x2 = cast unstructure("Y$X2(this$0=Y, abc=\"abc\")"); assertTrueVerbose(x2.this$1 instanceof Y); assertEqualsVerbose("abc", x2.abc); } end scope
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031242 |
Snippet name: | test_structure_with_thisDollar0 - ecj and javac differ in their use of this$0 or this$1 |
Eternal ID of this version: | #1031242/12 |
Text MD5: | 25c7084c00644005d12e4c6ebd940542 |
Transpilation MD5: | 1c825c8031cbbe41a05125c0d5387de3 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-24 21:40:50 |
Source code size: | 872 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 177 / 295 |
Version history: | 11 change(s) |
Referenced in: | [show references] |