Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: pkg/front_end/testcases/optional.dart.strong.expect

Issue 2949753002: Print static types of conditional expressions. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Too few positional arguments (optional.dart:45:22)
2 // Too many positional arguments (optional.dart:46:22)
3 // Too few positional arguments (optional.dart:47:25)
4 // Too many positional arguments (optional.dart:48:25)
5 library; 1 library;
6 import self as self; 2 import self as self;
7 import "dart:core" as core; 3 import "dart:core" as core;
8 4
9 class Foo extends core::Object { 5 class Foo extends core::Object {
10 constructor •() → void 6 constructor •() → void
11 : super core::Object::•() 7 : super core::Object::•()
12 ; 8 ;
13 method method(dynamic x, [dynamic y, dynamic z]) → dynamic { 9 method method(dynamic x, [dynamic y = null, dynamic z = null]) → dynamic {
14 return "string"; 10 return "string";
15 } 11 }
16 } 12 }
17 abstract class External extends core::Object { 13 abstract class External extends core::Object {
18 abstract method externalMethod(core::int x, [core::int y, core::int z]) → core ::String; 14 constructor •() → void
15 : super core::Object::•()
16 ;
17 abstract method externalMethod(core::int x, [core::int y = null, core::int z = null]) → core::String;
19 abstract method listen(self::Listener listener) → void; 18 abstract method listen(self::Listener listener) → void;
20 } 19 }
21 abstract class Listener extends core::Object { 20 abstract class Listener extends core::Object {
22 constructor •() → void 21 constructor •() → void
23 : super core::Object::•() 22 : super core::Object::•()
24 ; 23 ;
25 abstract method event(core::String input, [core::int x, core::int y]) → void; 24 abstract method event(core::String input, [core::int x = null, core::int y = n ull]) → void;
26 } 25 }
27 class TestListener extends self::Listener { 26 class TestListener extends self::Listener {
28 constructor •() → void 27 constructor •() → void
29 : super self::Listener::•() 28 : super self::Listener::•()
30 ; 29 ;
31 method event(core::String input, [core::int x, core::int y]) → void {} 30 method event(dynamic input, [dynamic x = null, dynamic y = null]) → void {}
32 } 31 }
33 class ExtendedListener extends self::Listener { 32 class ExtendedListener extends self::Listener {
34 constructor •() → void 33 constructor •() → void
35 : super self::Listener::•() 34 : super self::Listener::•()
36 ; 35 ;
37 method event(core::String input, [core::int x, core::int y, dynamic z]) → void {} 36 method event(dynamic input, [dynamic x = null, dynamic y = null, dynamic z = n ull]) → void {}
38 } 37 }
39 class InvalidListener extends core::Object { 38 class InvalidListener extends core::Object {
40 constructor •() → void 39 constructor •() → void
41 : super core::Object::•() 40 : super core::Object::•()
42 ; 41 ;
42 method event(dynamic input, [dynamic x = null]) → void {}
43 } 43 }
44 external static method createExternal() → self::External; 44 external static abstract method createExternal() → self::External;
45 static method main() → dynamic { 45 static method main() → dynamic {
46 self::Foo foo = new self::Foo::•(); 46 self::Foo foo = new self::Foo::•();
47 dynamic string1 = foo.{self::Foo::method}(1); 47 dynamic string1 = foo.{self::Foo::method}(1);
48 dynamic string2 = foo.{self::Foo::method}(1, 2); 48 dynamic string2 = foo.{self::Foo::method}(1, 2);
49 dynamic string3 = foo.{self::Foo::method}(1, 2, 3); 49 dynamic string3 = foo.{self::Foo::method}(1, 2, 3);
50 self::External extern = self::createExternal(); 50 self::External extern = self::createExternal();
51 core::String string4 = extern.{self::External::externalMethod}(1); 51 core::String string4 = extern.{self::External::externalMethod}(1);
52 core::String string5 = extern.{self::External::externalMethod}(1, 2); 52 core::String string5 = extern.{self::External::externalMethod}(1, 2);
53 core::String string6 = extern.{self::External::externalMethod}(1, 2, 3); 53 core::String string6 = extern.{self::External::externalMethod}(1, 2, 3);
54 extern.{self::External::listen}(new self::TestListener::•()); 54 extern.{self::External::listen}(new self::TestListener::•());
55 extern.{self::External::listen}(new self::ExtendedListener::•()); 55 extern.{self::External::listen}(new self::ExtendedListener::•());
56 extern.{self::External::listen}(new self::InvalidListener::•() as self::Listen er); 56 extern.{self::External::listen}(new self::InvalidListener::•());
57 dynamic nothing1 = foo.{self::Foo::method}(); 57 dynamic nothing1 = foo.{self::Foo::method}();
58 dynamic nothing2 = foo.{self::Foo::method}(1, 2, 3, 4); 58 dynamic nothing2 = foo.{self::Foo::method}(1, 2, 3, 4);
59 core::String nothing3 = extern.{self::External::externalMethod}(); 59 core::String nothing3 = extern.{self::External::externalMethod}();
60 core::String nothing4 = extern.{self::External::externalMethod}(1, 2, 3, 4); 60 core::String nothing4 = extern.{self::External::externalMethod}(1, 2, 3, 4);
61 } 61 }
OLDNEW
« no previous file with comments | « pkg/front_end/testcases/optional.dart.direct.expect ('k') | pkg/front_end/testcases/override.dart.direct.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698