Transpiled version (5556L) is out of date.
1 | set flag typeConversionScore_debug. |
2 | |
3 | scope test_newPreciseCall |
4 | |
5 | interface #Inti { |
6 | default int x() { ret 5; } |
7 | } |
8 | |
9 | svoid test_newPreciseCall() { |
10 | class X { |
11 | long x(long x) { ret x+1; } |
12 | |
13 | long y(long x) { ret x+1; } |
14 | long y(int x) { ret x+2; } |
15 | } |
16 | |
17 | set newPreciseCall_debug; |
18 | assertEqualsVerbose(6L, newPreciseCall(new X, "x", 5)); |
19 | assertEqualsVerbose(2L, newPreciseCall(new X, "x", 1L)); |
20 | assertEqualsVerbose(7L, newPreciseCall(new X, "y", 5)); |
21 | assertEqualsVerbose(2L, newPreciseCall(new X, "y", 1L)); |
22 | |
23 | please include function str. |
24 | assertEqualsVerbose("1.0", newPreciseCall(mainFunctionHolder str, "str", 1.0)); |
25 | please include function plus. |
26 | assertEqualsVerbose(3, newPreciseCall(mainFunctionHolder plus, "plus", 1, 2)); |
27 | please include function ll. |
28 | assertEqualsVerbose(ll(1, 2), newPreciseCall(mainFunctionHolder ll, "ll", 1, 2)); |
29 | |
30 | // Test calling a default method |
31 | |
32 | class Y is Inti {} |
33 | assertEqualsVerbose(5, newPreciseCall(new Y, "x")); |
34 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034744 |
Snippet name: | test_newPreciseCall (OK) |
Eternal ID of this version: | #1034744/14 |
Text MD5: | 87befd20b138b777d111cca600b9ef0f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-16 18:23:35 |
Source code size: | 1020 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 169 / 311 |
Version history: | 13 change(s) |
Referenced in: | [show references] |