Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1030863 // test_tok_questionDot (extending)

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4103L) is out of date.

1  
svoid test_tok_questionDot() {
2  
  testTranspilationFunction tok_questionDot(
3  
    "ret a?.b;",
4  
    "ret a == null ? null : a.b;",
5  
    "ret a?.b();",
6  
    "ret a == null ? null : a.b();",
7  
    "a?.bla();",
8  
    "{ if (a != null) a.bla(); }",
9  
    "deb()?.printVars();",
10  
    "{ var __0 = deb(); if (__0 != null) __0.printVars(); }",
11  
    "ret f()?.bla();",
12  
    "ret rCallF(f(), __0 -> __0 == null ?: __0.bla());",
13  
    /*"ret a?.b?.c;",
14  
    "ret __qdot c(__qdot b(a));",*/
15  
    "x + a?.bla()",
16  
    "x + (a == null ? null : a.bla())",
17  
    "x + a?.bla();",
18  
    "x + (a == null ? null : a.bla());",
19  
  );
20  
}

Author comment

Began life as a copy of #1030765

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030863
Snippet name: test_tok_questionDot (extending)
Eternal ID of this version: #1030863/18
Text MD5: 4facaa92a29bcb4f2ea4e949a1bd4d8f
Author: stefan
Category: javax / transpiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-06 11:04:06
Source code size: 610 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 242 / 363
Version history: 17 change(s)
Referenced in: [show references]