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

32
LINES

< > BotCompany Repo | #1030980 // test_tok_akaFunctionNames

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

Transpiled version (5367L) is out of date.

1  
svoid test_tok_akaFunctionNames() {
2  
  testTranspilationFunction2 tok_akaFunctionNames(
3  
    "void tailCall aka replace(Computable x) { bla(); }",
4  
      "final void replace(Computable x) { tailCall(x); }\nvoid tailCall(Computable x) { bla(); }",
5  
    "final void tailCall aka replace(Computable x) { bla(); }",
6  
      "final void replace(Computable x) { tailCall(x); }\nfinal void tailCall(Computable x) { bla(); }",
7  
    "S tailCall aka replace(Computable x) { ret bla(); }",
8  
      "final S replace(Computable x) { return tailCall(x); }\nS tailCall(Computable x) { ret bla(); }",
9  
    "void a aka b aka c() { d(); }",
10  
      "final void b() { a(); }\nfinal void c() { a(); }\nvoid a() { d(); }",
11  
    "void mapMethodLike a aka b(S s) { c(s); }",
12  
      "final void mapMethodLike b(S s) { a(s); }\nvoid mapMethodLike a(S s) { c(s); }",
13  
    "void a aka b() throws Bla { c(); }",
14  
      "final void b() throws Bla { a(); }\nvoid a() throws Bla { c(); }",
15  
      
16  
    // abstract methods
17  
    "abstract void a aka b();",
18  
      "final void b() { a(); }\nabstract void a();",
19  
      
20  
    // default methods
21  
    "default void a aka b();",
22  
      "default void b() { a(); }\n void a();",
23  
      
24  
    // same but without giving the default modifier
25  
    "void a aka b();",
26  
      "default void b() { a(); }\n void a();",
27  
      
28  
    // synchronized methods
29  
    "synchronized void a aka b() { ... }",
30  
      "final void b() { a(); }\n synchronized void a() { ... }",
31  
  );
32  
}

Author comment

Began life as a copy of #1028000

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1030980
Snippet name: test_tok_akaFunctionNames
Eternal ID of this version: #1030980/22
Text MD5: 2c7353c33824500b9aec571676a94dd4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-07 18:19:12
Source code size: 1476 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 172 / 327
Version history: 21 change(s)
Referenced in: [show references]