| library; | |
| // | |
| // Problems in library: | |
| // | |
| // pkg/front_end/testcases/patterns/object_pattern_errors.dart:12:14: Error: Expected 0 type arguments. | |
| // if (x case A<int>()) {} // Error. | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/patterns/object_pattern_errors.dart:15:14: Error: Expected 1 type arguments. | |
| // if (x case B<String, num>()) {} // Error. | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/patterns/object_pattern_errors.dart:16:16: Error: The getter name is not specified explicitly, and the pattern is not a variable. Try specifying the getter name explicitly, or using a variable pattern. | |
| // if (x case A(:5)) {} // Error | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/patterns/object_pattern_errors.dart:17:16: Error: A pattern field in an object pattern must be named. | |
| // Try adding a pattern name or ':' before the pattern. | |
| // if (x case A(5)) {} // Error | |
| // ^ | |
| // | |
| // pkg/front_end/testcases/patterns/object_pattern_errors.dart:18:20: Error: A pattern field in an object pattern must be named. | |
| // Try adding a pattern name or ':' before the pattern. | |
| // if (x case A(var a)) {} // Error | |
| // ^ | |
| // | |
| import self as self; | |
| import "dart:core" as core; | |
| typedef B<unrelated X extends core::Object? = dynamic> = self::A; | |
| class A extends core::Object { | |
| field core::int? field = null; | |
| synthetic constructor •() → self::A | |
| : super core::Object::•() | |
| ; | |
| } | |
| static method test(dynamic x) → dynamic { | |
| { | |
| final synthesized dynamic #0#0 = x; | |
| if(#0#0 is invalid-type) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #1#0 = x; | |
| if(#1#0 is self::A) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #2#0 = x; | |
| if(#2#0 is self::A) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #3#0 = x; | |
| if(#3#0 is invalid-type) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #4#0 = x; | |
| if(#4#0 is self::A) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #5#0 = x; | |
| if(#5#0 is self::A) { | |
| } | |
| } | |
| { | |
| final synthesized dynamic #6#0 = x; | |
| if(#6#0 is self::A) { | |
| } | |
| } | |
| } | |
| static synthetic method _#B#new#tearOff<unrelated X extends core::Object? = dynamic>() → self::A | |
| return new self::A::•(); |