Files
sdk/pkg/kernel/testcases/input/call.dart
T
Asger Feldthaus 4b860db14b [kernel] Reorganize baseline testing.
A single suite of test files is now shared among these configurations,
each with their own expected outputs:
- spec mode
- strong mode
- spec mode w/ type propagation

Although some tests are going to focus on a specific configuration,
for now it seems easier to maintain a single set of tests.

No additional tests have been added in this CL, but the intention
is to start adding more tests.

The baseline tests no longer contain any checked-in dill files.

To simplify dependencies, these tests do not rely on a patched SDK,
which means the async transformer cannot currently be tested with
this framework.

BUG=
R=kmillikin@google.com

Review URL: https://chromereviews.googleplex.com/507347013 .
2016-09-21 12:23:11 +02:00

45 lines
1.1 KiB
Dart

class Callable {
call(x) {
return "string";
}
}
class CallableGetter {
get call => new Callable();
}
main() {
var closure = (x) => x;
var int1 = closure(1);
var int2 = closure.call(1);
var int3 = closure.call.call(1);
var int4 = closure.call.call.call(1);
var callable = new Callable();
var string1 = callable(1);
var string2 = callable.call(1);
var string3 = callable.call.call(1);
var string4 = callable.call.call.call(1);
var callableGetter = new CallableGetter();
var string5 = callableGetter(1);
var string6 = callableGetter.call(1);
var string7 = callableGetter.call.call(1);
var string8 = callableGetter.call.call.call(1);
var nothing1 = closure();
var nothing2 = closure.call();
var nothing3 = closure.call.call();
var nothing4 = closure.call.call.call();
var nothing5 = callable();
var nothing6 = callable.call();
var nothing7 = callable.call.call();
var nothing8 = callable.call.call.call();
var nothing9 = callableGetter();
var nothing10 = callableGetter.call();
var nothing11 = callableGetter.call.call();
var nothing12 = callableGetter.call.call.call();
}