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.

svoid test_tok_akaFunctionNames() {
  testTranspilationFunction2 tok_akaFunctionNames(
    "void tailCall aka replace(Computable x) { bla(); }",
      "final void replace(Computable x) { tailCall(x); }\nvoid tailCall(Computable x) { bla(); }",
    "final void tailCall aka replace(Computable x) { bla(); }",
      "final void replace(Computable x) { tailCall(x); }\nfinal void tailCall(Computable x) { bla(); }",
    "S tailCall aka replace(Computable x) { ret bla(); }",
      "final S replace(Computable x) { return tailCall(x); }\nS tailCall(Computable x) { ret bla(); }",
    "void a aka b aka c() { d(); }",
      "final void b() { a(); }\nfinal void c() { a(); }\nvoid a() { d(); }",
    "void mapMethodLike a aka b(S s) { c(s); }",
      "final void mapMethodLike b(S s) { a(s); }\nvoid mapMethodLike a(S s) { c(s); }",
    "void a aka b() throws Bla { c(); }",
      "final void b() throws Bla { a(); }\nvoid a() throws Bla { c(); }",
      
    // abstract methods
    "abstract void a aka b();",
      "final void b() { a(); }\nabstract void a();",
      
    // default methods
    "default void a aka b();",
      "default void b() { a(); }\n void a();",
      
    // same but without giving the default modifier
    "void a aka b();",
      "default void b() { a(); }\n void a();",
      
    // synchronized methods
    "synchronized void a aka b() { ... }",
      "final void b() { a(); }\n synchronized void a() { ... }",
  );
}

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: 231 / 409
Version history: 21 change(s)
Referenced in: [show references]