blob: 9ffebaf492922b7673061c8dedfbb9b5efc579e8 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/pattern_types.dart:6:1: Error: 'Invalid' is imported from both 'pkg/front_end/testcases/patterns/pattern_types_lib1.dart' and 'pkg/front_end/testcases/patterns/pattern_types_lib2.dart'.
// import 'pattern_types_lib2.dart';
// ^^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:82:20: Error: Undefined name 'field'.
// case Invalid(: field): // invalid get
// ^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:82:18: 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.
// case Invalid(: field): // invalid get
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:73:16: Error: The getter 'missing' isn't defined for the class 'Class'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'missing'.
// case Class(: var missing): // Error: missing getter
// ^^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:74:17: Error: The getter 'field' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'field'.
// case Class_(: var field): // Error: nullable member get
// ^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:75:17: Error: The getter 'method' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'method'.
// case Class_(: var method): // Error: nullable member tear-off
// ^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:76:17: Error: The getter 'extensionGetter' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionGetter'.
// case Class_(: var extensionGetter): // Error: nullable extension member get
// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:77:17: Error: The getter 'extensionMethod' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionMethod'.
// case Class_(: var extensionMethod): // Error: nullable extension tear-off
// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:78:21: Error: The getter 'call' isn't defined for the class 'void Function()?'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'call'.
// case Function1_(: var call): // Error: nullable function tear-off
// ^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:79:19: Error: The getter '$1' isn't defined for the class '(int, {String named})?'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named '$1'.
// case Record1_(: var $1): // Error: nullable record index get
// ^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:80:19: Error: The getter 'named' isn't defined for the class '(int, {String named})?'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
// case Record1_(: var named): // Error: nullable record named get
// ^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:81:16: Error: The getter 'ambiguousField' isn't defined for the class 'Class'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'ambiguousField'.
// case Class(: var ambiguousField): // Error: ambiguous get
// ^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:125:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
// Try using a constructor or factory that is 'const'.
// if (cls2 case == const Class2()) {} // instance ==
// ^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:127:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
// Try using a constructor or factory that is 'const'.
// if (cls2 case != const Class2()) {} // instance == negated
// ^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:129:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
// Try using a constructor or factory that is 'const'.
// if (cls2 case < const Class2()) {} // instance <
// ^^^^^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:113:18: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
// if (cls case < '0') {} // Error: invalid instance < argument
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:115:16: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
// if (cls case > 0) {} // Error: invalid instance >
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:119:17: Error: The method '<' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing method, or defining a method named '<'.
// if (cls_ case < 0) {} // Error: nullable instance <
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:120:17: Error: The method '<=' isn't defined for the class 'Class?'.
// - 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// Try correcting the name to the name of an existing method, or defining a method named '<='.
// if (cls_ case <= 0) {} // Error: nullable extension <=
// ^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:121:19: Error: The method '<' isn't defined for the class 'String'.
// Try correcting the name to the name of an existing method, or defining a method named '<'.
// if (string case < 0) {} // Error: missing <
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:122:19: Error: The method '<=' isn't defined for the class 'String'.
// Try correcting the name to the name of an existing method, or defining a method named '<='.
// if (string case <= 0) {} // Error: ambiguous <=
// ^^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:126:20: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
// - 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// if (cls2 case == 0) {} // Error: invalid instance == argument
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:128:20: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
// - 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// if (cls2 case != 0) {} // Error: invalid instance == argument negated
// ^
//
// pkg/front_end/testcases/patterns/pattern_types.dart:130:19: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
// - 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
// if (cls2 case < 0) {} // Error: invalid instance < argument
// ^
//
import self as self;
import "dart:core" as core;
import "org-dartlang-testcase:///pattern_types_lib1.dart";
import "org-dartlang-testcase:///pattern_types_lib2.dart";
typedef Dynamic = dynamic;
typedef Function1 = () void;
typedef Function1_ = () →? void;
typedef Record1 = (core::int, {required named: core::String});
typedef Record1_ = (core::int, {required named: core::String})?;
typedef Class_ = self::Class?;
class Class extends core::Object {
field dynamic field = null;
synthetic constructor •() self::Class
: super core::Object::•()
;
method method() void {}
operator <(core::int i) core::bool
return true;
operator >(core::int i) core::int
return 0;
operator ==(core::Object other) core::bool
return true;
}
class Class2 extends core::Object {
synthetic constructor •() self::Class2
: super core::Object::•()
;
operator <(self::Class2 i) core::bool
return true;
operator ==(covariant-by-declaration self::Class2 other) core::bool
return true;
}
extension /* unnamed */ _extension#0 on self::Class {
get extensionGetter = self::_extension#0|get#extensionGetter;
method extensionMethod = self::_extension#0|extensionMethod;
method tearoff extensionMethod = self::_extension#0|get#extensionMethod;
operator <= = self::_extension#0|<=;
operator >= = self::_extension#0|>=;
get ambiguousField = self::_extension#0|get#ambiguousField;
}
extension /* unnamed */ _extension#1 on self::Class {
get ambiguousField = self::_extension#1|get#ambiguousField;
}
extension /* unnamed */ _extension#2 on core::String {
operator <= = self::_extension#2|<=;
}
extension /* unnamed */ _extension#3 on core::String {
operator <= = self::_extension#3|<=;
}
static extension-member method _extension#0|get#extensionGetter(lowered final self::Class #this) → core::int
return 42;
static extension-member method _extension#0|extensionMethod(lowered final self::Class #this) → void {}
static extension-member method _extension#0|get#extensionMethod(lowered final self::Class #this) → () → void
return () void => self::_extension#0|extensionMethod(#this);
static extension-member method _extension#0|<=(lowered final self::Class #this, core::int i) → core::bool
return true;
static extension-member method _extension#0|>=(lowered final self::Class #this, core::int i) → core::int
return 0;
static extension-member method _extension#0|get#ambiguousField(lowered final self::Class #this) → core::int
return 42;
static extension-member method _extension#1|get#ambiguousField(lowered final self::Class #this) → core::String
return "42";
static extension-member method _extension#2|<=(lowered final core::String #this, dynamic other) → core::bool
return true;
static extension-member method _extension#3|<=(lowered final core::String #this, dynamic other) → core::bool
return true;
static method objectPattern(dynamic o) dynamic {
#L1:
{
final synthesized dynamic #0#0 = o;
synthesized dynamic #0#5;
synthesized core::bool #0#5#isSet = false;
synthesized dynamic #0#6;
synthesized core::bool #0#6#isSet = false;
synthesized dynamic #0#12;
synthesized core::bool #0#12#isSet = false;
synthesized dynamic #0#14;
synthesized core::bool #0#14#isSet = false;
synthesized dynamic #0#15;
synthesized core::bool #0#15#isSet = false;
{
hoisted core::int hashCode;
hoisted () core::String toString;
lowered hoisted dynamic field#case#0;
lowered hoisted () void method#case#0;
lowered hoisted core::int extensionGetter#case#0;
lowered hoisted () void extensionMethod#case#0;
hoisted dynamic dynamicAccess;
lowered hoisted () void call#case#0;
lowered hoisted core::int $1#case#0;
lowered hoisted core::String named#case#0;
dynamic missing;
lowered dynamic field#case#1;
lowered () void method#case#1;
lowered core::int extensionGetter#case#1;
lowered () void extensionMethod#case#1;
lowered () →? void call#case#1;
lowered core::int $1#case#1;
lowered core::String named#case#1;
invalid-type ambiguousField;
if(#0#0 is Null && (let final core::int #t1 = hashCode = #0#0{Null}.{core::Object::hashCode}{<object>}.{core::int} in true) || #0#0 is Null && (let final () → core::String #t2 = toString = #0#0{Null}.{core::Object::toString}{<object>}.{() → core::String} in true) || #0#0 is self::Class && (let final dynamic #t3 = field#case#0 = #0#5#isSet ?{dynamic} #0#5{dynamic} : let final core::bool #t4 = #0#5#isSet = true in #0#5 = #0#0{self::Class}.{self::Class::field}{dynamic} in true) || #0#0 is self::Class && (let final () → void #t5 = method#case#0 = #0#6#isSet ?{() → void} #0#6{() → void} : let final core::bool #t6 = #0#6#isSet = true in #0#6 = #0#0{self::Class}.{self::Class::method}{() → void} in true) || #0#0 is self::Class && (let final core::int #t7 = extensionGetter#case#0 = self::_extension#0|get#extensionGetter(#0#0{self::Class}) in true) || #0#0 is self::Class && (let final () → void #t8 = extensionMethod#case#0 = self::_extension#0|get#extensionMethod(#0#0{self::Class}) in true) || #0#0 is dynamic && (let final dynamic #t9 = dynamicAccess = #0#0{dynamic}.dynamicAccess in true) || #0#0 is () → void && (let final () → void #t10 = call#case#0 = #0#12#isSet ?{() → void} #0#12{() → void} : let final core::bool #t11 = #0#12#isSet = true in #0#12 = #0#0{() → void} in true) || #0#0 is (core::int, {required named: core::String}) && (let final core::int #t12 = $1#case#0 = #0#14#isSet ?{core::int} #0#14{core::int} : let final core::bool #t13 = #0#14#isSet = true in #0#14 = #0#0{(core::int, {required named: core::String})}.$1{core::int} in true) || #0#0 is (core::int, {required named: core::String}) && (let final core::String #t14 = named#case#0 = #0#15#isSet ?{core::String} #0#15{core::String} : let final core::bool #t15 = #0#15#isSet = true in #0#15 = #0#0{(core::int, {required named: core::String})}.named{core::String} in true) || #0#0 is self::Class && (let final invalid-type #t16 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:73:16: Error: The getter 'missing' isn't defined for the class 'Class'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'missing'.
case Class(: var missing): // Error: missing getter
^^^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:73:16: Error: The getter 'missing' isn't defined for the class 'Class'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'missing'.
case Class(: var missing): // Error: missing getter
^^^^^^^") || #0#0 is self::Class? && (let final invalid-type #t17 = #0#5#isSet ?{invalid-type} #0#5{invalid-type} : let final core::bool #t18 = #0#5#isSet = true in #0#5 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:74:17: Error: The getter 'field' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'field'.
case Class_(: var field): // Error: nullable member get
^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:74:17: Error: The getter 'field' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'field'.
case Class_(: var field): // Error: nullable member get
^^^^^") || #0#0 is self::Class? && (let final invalid-type #t19 = #0#6#isSet ?{invalid-type} #0#6{invalid-type} : let final core::bool #t20 = #0#6#isSet = true in #0#6 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:75:17: Error: The getter 'method' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'method'.
case Class_(: var method): // Error: nullable member tear-off
^^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:75:17: Error: The getter 'method' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'method'.
case Class_(: var method): // Error: nullable member tear-off
^^^^^^") || #0#0 is self::Class? && (let final invalid-type #t21 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:76:17: Error: The getter 'extensionGetter' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionGetter'.
case Class_(: var extensionGetter): // Error: nullable extension member get
^^^^^^^^^^^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:76:17: Error: The getter 'extensionGetter' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionGetter'.
case Class_(: var extensionGetter): // Error: nullable extension member get
^^^^^^^^^^^^^^^") || #0#0 is self::Class? && (let final invalid-type #t22 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:77:17: Error: The getter 'extensionMethod' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionMethod'.
case Class_(: var extensionMethod): // Error: nullable extension tear-off
^^^^^^^^^^^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:77:17: Error: The getter 'extensionMethod' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'extensionMethod'.
case Class_(: var extensionMethod): // Error: nullable extension tear-off
^^^^^^^^^^^^^^^") || #0#0 is () →? void && (let final invalid-type #t23 = #0#12#isSet ?{invalid-type} #0#12{invalid-type} : let final core::bool #t24 = #0#12#isSet = true in #0#12 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:78:21: Error: The getter 'call' isn't defined for the class 'void Function()?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'call'.
case Function1_(: var call): // Error: nullable function tear-off
^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:78:21: Error: The getter 'call' isn't defined for the class 'void Function()?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'call'.
case Function1_(: var call): // Error: nullable function tear-off
^^^^") || #0#0 is (core::int, {required named: core::String})? && (let final invalid-type #t25 = #0#14#isSet ?{invalid-type} #0#14{invalid-type} : let final core::bool #t26 = #0#14#isSet = true in #0#14 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:79:19: Error: The getter '\$1' isn't defined for the class '(int, {String named})?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named '\$1'.
case Record1_(: var \$1): // Error: nullable record index get
^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:79:19: Error: The getter '\$1' isn't defined for the class '(int, {String named})?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named '\$1'.
case Record1_(: var \$1): // Error: nullable record index get
^^") || #0#0 is (core::int, {required named: core::String})? && (let final invalid-type #t27 = #0#15#isSet ?{invalid-type} #0#15{invalid-type} : let final core::bool #t28 = #0#15#isSet = true in #0#15 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:80:19: Error: The getter 'named' isn't defined for the class '(int, {String named})?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
case Record1_(: var named): // Error: nullable record named get
^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:80:19: Error: The getter 'named' isn't defined for the class '(int, {String named})?'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'named'.
case Record1_(: var named): // Error: nullable record named get
^^^^^") || #0#0 is self::Class && (let final invalid-type #t29 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:81:16: Error: The getter 'ambiguousField' isn't defined for the class 'Class'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ambiguousField'.
case Class(: var ambiguousField): // Error: ambiguous get
^^^^^^^^^^^^^^" in invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:81:16: Error: The getter 'ambiguousField' isn't defined for the class 'Class'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ambiguousField'.
case Class(: var ambiguousField): // Error: ambiguous get
^^^^^^^^^^^^^^") || #0#0 is invalid-type) {
}
}
}
}
static method relationalPattern(dynamic dyn, Never never, self::Class cls, self::Class? cls_, invalid-type invalid, core::String string, self::Class2 cls2, self::Class2? cls2_) → dynamic {
{
final synthesized dynamic #0#0 = dyn;
if(#0#0 =={core::Object::==}{(core::Object) → core::bool} #C1) {
}
}
{
final synthesized dynamic #1#0 = dyn;
if(!(#1#0 =={core::Object::==}{(core::Object) → core::bool} #C1)) {
}
}
{
final synthesized dynamic #2#0 = dyn;
if(#2#0{dynamic}.<(#C1) as core::bool) {
}
}
{
final synthesized dynamic #3#0 = dyn;
if(#3#0{dynamic}.<=(#C1) as core::bool) {
}
}
{
final synthesized dynamic #4#0 = dyn;
if(#4#0{dynamic}.>(#C1) as core::bool) {
}
}
{
final synthesized dynamic #5#0 = dyn;
if(#5#0{dynamic}.>=(#C1) as core::bool) {
}
}
{
final synthesized Never #6#0 = never;
if(#6#0 =={core::Object::==}{(dynamic) → Never} #C1) {
}
}
{
final synthesized Never #7#0 = never;
if(!(#7#0 =={core::Object::==}{(dynamic) → Never} #C1)) {
}
}
{
final synthesized Never #8#0 = never;
if(#8#0{Never}.<(#C1)) {
}
}
{
final synthesized Never #9#0 = never;
if(#9#0{Never}.<=(#C1)) {
}
}
{
final synthesized Never #10#0 = never;
if(#10#0{Never}.>(#C1)) {
}
}
{
final synthesized Never #11#0 = never;
if(#11#0{Never}.>=(#C1)) {
}
}
{
final synthesized self::Class #12#0 = cls;
if(#12#0 =={self::Class::==}{(core::Object) → core::bool} #C1) {
}
}
{
final synthesized self::Class #13#0 = cls;
if(!(#13#0 =={self::Class::==}{(core::Object) → core::bool} #C1)) {
}
}
{
final synthesized self::Class #14#0 = cls;
if(#14#0.{self::Class::<}(#C1){(core::int) → core::bool}) {
}
}
{
final synthesized self::Class #15#0 = cls;
if(self::_extension#0|<=(#15#0, #C1)) {
}
}
{
final synthesized self::Class #16#0 = cls;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:113:18: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
if (cls case < '0') {} // Error: invalid instance < argument
^") {
}
}
{
final synthesized self::Class #17#0 = cls;
if(self::_extension#0|<=(#17#0, #C2 as core::int)) {
}
}
{
final synthesized self::Class #18#0 = cls;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:115:16: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
if (cls case > 0) {} // Error: invalid instance >
^") {
}
}
{
final synthesized self::Class #19#0 = cls;
if(self::_extension#0|>=(#19#0, #C1) as core::bool) {
}
}
{
final synthesized self::Class? #20#0 = cls_;
if(#20#0 =={self::Class::==}{(core::Object) → core::bool} #C1) {
}
}
{
final synthesized self::Class? #21#0 = cls_;
if(!(#21#0 =={self::Class::==}{(core::Object) → core::bool} #C1)) {
}
}
{
final synthesized self::Class? #22#0 = cls_;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:119:17: Error: The method '<' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing method, or defining a method named '<'.
if (cls_ case < 0) {} // Error: nullable instance <
^") {
}
}
{
final synthesized self::Class? #23#0 = cls_;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:120:17: Error: The method '<=' isn't defined for the class 'Class?'.
- 'Class' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
Try correcting the name to the name of an existing method, or defining a method named '<='.
if (cls_ case <= 0) {} // Error: nullable extension <=
^^") {
}
}
{
final synthesized core::String #24#0 = string;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:121:19: Error: The method '<' isn't defined for the class 'String'.
Try correcting the name to the name of an existing method, or defining a method named '<'.
if (string case < 0) {} // Error: missing <
^") {
}
}
{
final synthesized core::String #25#0 = string;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:122:19: Error: The method '<=' isn't defined for the class 'String'.
Try correcting the name to the name of an existing method, or defining a method named '<='.
if (string case <= 0) {} // Error: ambiguous <=
^^") {
}
}
{
final synthesized invalid-type #26#0 = invalid;
if(#26#0 =={core::Object::==}{(core::Object) → core::bool} #C1) {
}
}
{
final synthesized invalid-type #27#0 = invalid;
if(#27#0{<invalid>}.<(#C1)) {
}
}
{
final synthesized self::Class2 #28#0 = cls2;
final const synthesized invalid-type #28#1 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:125:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case == const Class2()) {} // instance ==
^^^^^^";
if(#28#0 =={self::Class2::==}{(self::Class2) → core::bool} invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:125:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case == const Class2()) {} // instance ==
^^^^^^") {
}
}
{
final synthesized self::Class2 #29#0 = cls2;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:126:20: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
- 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
if (cls2 case == 0) {} // Error: invalid instance == argument
^") {
}
}
{
final synthesized self::Class2 #30#0 = cls2;
final const synthesized invalid-type #30#1 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:127:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case != const Class2()) {} // instance == negated
^^^^^^";
if(!(#30#0 =={self::Class2::==}{(self::Class2) → core::bool} invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:127:26: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case != const Class2()) {} // instance == negated
^^^^^^")) {
}
}
{
final synthesized self::Class2 #31#0 = cls2;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:128:20: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
- 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
if (cls2 case != 0) {} // Error: invalid instance == argument negated
^") {
}
}
{
final synthesized self::Class2 #32#0 = cls2;
final const synthesized invalid-type #32#1 = invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:129:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case < const Class2()) {} // instance <
^^^^^^";
if(#32#0.{self::Class2::<}(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:129:25: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
Try using a constructor or factory that is 'const'.
if (cls2 case < const Class2()) {} // instance <
^^^^^^"){(self::Class2) → core::bool}) {
}
}
{
final synthesized self::Class2 #33#0 = cls2;
if(invalid-expression "pkg/front_end/testcases/patterns/pattern_types.dart:130:19: Error: The argument type 'int' can't be assigned to the parameter type 'Class2'.
- 'Class2' is from 'pkg/front_end/testcases/patterns/pattern_types.dart'.
if (cls2 case < 0) {} // Error: invalid instance < argument
^") {
}
}
{
final synthesized self::Class2? #34#0 = cls2_;
if(#34#0 == null) {
}
}
}
library;
import self as self2;
import "dart:core" as core;
class Invalid extends core::Object {
field dynamic field = null;
synthetic constructor •() → self2::Invalid
: super core::Object::•()
;
operator <(dynamic other) → dynamic
return true;
operator ==(core::Object other) → core::bool
return true;
}
library;
import self as self3;
import "dart:core" as core;
class Invalid extends core::Object {
field dynamic field = null;
synthetic constructor •() → self3::Invalid
: super core::Object::•()
;
operator <(dynamic other) → dynamic
return true;
operator ==(core::Object other) → core::bool
return true;
}
constants {
#C1 = 0
#C2 = "0"
}