mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
[cfe] Use StateError as the pattern matching error in assignments
Part of https://github.com/dart-lang/sdk/issues/49749 Change-Id: I9c4fb121526ca40e5809be8f4a8a5770d551cfb1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291063 Commit-Queue: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
f5aaf580e6
commit
628ba2ac64
|
@ -1666,7 +1666,7 @@ class ConstantsTransformer extends RemovingTransformer {
|
|||
|
||||
List<Statement> replacementStatements = [
|
||||
...matchingCache.declarations,
|
||||
// TODO(cstefantsova): Figure out the right exception to throw.
|
||||
// TODO(cstefantsova): Provide a better diagnostic message.
|
||||
createIfStatement(
|
||||
createNot(readMatchingExpression),
|
||||
createExpressionStatement(createThrow(createConstructorInvocation(
|
||||
|
@ -1726,12 +1726,15 @@ class ConstantsTransformer extends RemovingTransformer {
|
|||
List<Statement> replacementStatements = [
|
||||
...node.pattern.declaredVariables,
|
||||
...matchingCache.declarations,
|
||||
// TODO(cstefantsova): Figure out the right exception to throw.
|
||||
// TODO(cstefantsova): Provide a better diagnostic message.
|
||||
createIfStatement(
|
||||
createNot(readMatchingExpression),
|
||||
createExpressionStatement(createThrow(createConstructorInvocation(
|
||||
typeEnvironment.coreTypes.reachabilityErrorConstructor,
|
||||
createArguments([], fileOffset: node.fileOffset),
|
||||
typeEnvironment.coreTypes.stateErrorConstructor,
|
||||
createArguments([
|
||||
createStringLiteral(messagePatternMatchingError.problemMessage,
|
||||
fileOffset: node.fileOffset)
|
||||
], fileOffset: node.fileOffset),
|
||||
fileOffset: node.fileOffset))),
|
||||
fileOffset: node.fileOffset),
|
||||
];
|
||||
|
|
|
@ -25,7 +25,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t3 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t3 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -46,7 +45,7 @@ static method errors(self::Class c) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = 42;
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
|
||||
Extension(c) += 42;
|
||||
|
|
|
@ -30,7 +30,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -46,7 +45,7 @@ static method errors(self::Class c) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = 42;
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
|
||||
Extension(c) += 42;
|
||||
|
|
|
@ -30,7 +30,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -46,7 +45,7 @@ static method errors(self::Class c) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = 42;
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
|
||||
Extension(c) += 42;
|
||||
|
|
|
@ -30,7 +30,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -46,7 +45,7 @@ static method errors(self::Class c) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = 42;
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
|
||||
Extension(c) += 42;
|
||||
|
|
|
@ -30,7 +30,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -46,7 +45,7 @@ static method errors(self::Class c) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = 42;
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/extensions/explicit_invalid_access.dart:12:3: Error: Explicit extension application cannot be used as an expression.
|
||||
Extension(c) += 42;
|
||||
|
|
|
@ -20,7 +20,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
|
@ -50,7 +49,7 @@ static method errors() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = new self::C::•();
|
||||
if(!(let final dynamic #t1 = c2 = #0#0{self::C} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/general/issue40242.dart:20:3: Error: Can't assign to the const variable 'c3'.
|
||||
c3 = null;
|
||||
|
|
|
@ -20,7 +20,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
|
@ -50,7 +49,7 @@ static method errors() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = new self::C::•();
|
||||
if(!(let final self::C #t1 = c2 = #0#0{self::C} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/general/issue40242.dart:20:3: Error: Can't assign to the const variable 'c3'.
|
||||
c3 = null;
|
||||
|
|
|
@ -20,7 +20,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
|
@ -50,7 +49,7 @@ static method errors() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = new self::C::•();
|
||||
if(!(let final dynamic #t1 = c2 = #0#0{self::C} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/general/issue40242.dart:20:3: Error: Can't assign to the const variable 'c3'.
|
||||
c3 = null;
|
||||
|
|
|
@ -20,7 +20,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
|
@ -50,7 +49,7 @@ static method errors() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = new self::C::•();
|
||||
if(!(let final dynamic #t1 = c2 = #0#0{self::C} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/general/issue40242.dart:20:3: Error: Can't assign to the const variable 'c3'.
|
||||
c3 = null;
|
||||
|
|
|
@ -20,7 +20,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class C extends core::Object {
|
||||
synthetic constructor •() → self::C
|
||||
|
@ -50,7 +49,7 @@ static method errors() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = new self::C::•();
|
||||
if(!(let final self::C #t1 = c2 = #0#0{self::C} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
invalid-expression "pkg/front_end/testcases/general/issue40242.dart:20:3: Error: Can't assign to the const variable 'c3'.
|
||||
c3 = null;
|
||||
|
|
|
@ -25,7 +25,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t3 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t3 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (2, "Hello");
|
||||
if(!(let final dynamic #t1 = #j#set(#0#0{(core::int, core::String)}.$1{core::int}){(core::int) → dynamic} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(#j#get(){() → core::int});
|
||||
}
|
||||
|
|
|
@ -81,14 +81,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:32:7: Error: Can't assign to the final variable '#initializedLateFinal'.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t5 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t6 = #definitelyUnassignedLateFinal#set(#1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true) && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -109,7 +109,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#3#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#9#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t11 = #notDefinitelyAssignedLateFinal#set((#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,14 +81,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:32:7: Error: Can't assign to the final variable '#initializedLateFinal'.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^" && (let final core::Object? #t5 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t6 = #definitelyUnassignedLateFinal#set(#1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true) && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -109,7 +109,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#3#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#9#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t11 = #notDefinitelyAssignedLateFinal#set((#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,14 +96,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:32:7: Error: Can't assign to the final variable '#initializedLateFinal'.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t2 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t3 = #definitelyUnassignedLateFinal#set(#1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true) && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -124,7 +124,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#3#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#9#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t8 = #notDefinitelyAssignedLateFinal#set((#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,14 +96,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:32:7: Error: Can't assign to the final variable '#initializedLateFinal'.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t2 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t3 = #definitelyUnassignedLateFinal#set(#1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true) && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -124,7 +124,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#3#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#9#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t8 = #notDefinitelyAssignedLateFinal#set((#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,14 +96,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:32:7: Error: Can't assign to the final variable '#initializedLateFinal'.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^" && (let final core::Object? #t2 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t3 = #definitelyUnassignedLateFinal#set(#1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true) && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -124,7 +124,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#3#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#9#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/late_lowering/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16#func(){() → dynamic} is{ForNonNullableByDefault} core::List<dynamic> && (#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t8 = #notDefinitelyAssignedLateFinal#set((#2#16#func(){() → dynamic} as{ForNonNullableByDefault} core::List<dynamic>).{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int?){(core::int) → dynamic} in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method guard() → dynamic
|
||||
return true;
|
||||
|
@ -16,7 +15,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = <core::int>[5];
|
||||
if(!(#1#0{core::List<core::int>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = b = #1#0{core::List<core::int>}.{core::List::[]}(0){(core::int) → core::int} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::int #2#0 = a;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method guard() → dynamic
|
||||
return true;
|
||||
|
@ -16,7 +15,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = core::_GrowableList::_literal1<core::int>(5);
|
||||
if(!(#1#0{core::List<core::int>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t2 = b = #1#0{core::List<core::int>}.{core::List::[]}(0){(core::int) → core::int} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::int #2#0 = a;
|
||||
|
|
|
@ -16,7 +16,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = <core::int>[5];
|
||||
if(!(#1#0{core::List<core::int>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = b = #1#0{core::List<core::int>}.{core::List::[]}(0){(core::int) → core::int} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::int #2#0 = a;
|
||||
|
|
|
@ -16,7 +16,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = <core::int>[5];
|
||||
if(!(#1#0{core::List<core::int>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = b = #1#0{core::List<core::int>}.{core::List::[]}(0){(core::int) → core::int} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::int #2#0 = a;
|
||||
|
|
|
@ -16,7 +16,7 @@ static method main() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = core::_GrowableList::_literal1<core::int>(5);
|
||||
if(!(#1#0{core::List<core::int>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t2 = b = #1#0{core::List<core::int>}.{core::List::[]}(0){(core::int) → core::int} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::int #2#0 = a;
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method method() → dynamic {
|
||||
core::int v1 = 42;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = "The string!" as{ForNonNullableByDefault} dynamic;
|
||||
if(!(let final dynamic #t1 = v1 = #0#0 as{ForNonNullableByDefault} core::int in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(v1);
|
||||
core::print(v1.{core::Object::runtimeType}{core::Type});
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method method() → dynamic {
|
||||
core::int v1 = 42;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = "The string!" as{ForNonNullableByDefault} dynamic;
|
||||
if(!(let final core::int #t1 = v1 = #0#0 as{ForNonNullableByDefault} core::int in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(v1);
|
||||
core::print(v1.{core::Object::runtimeType}{core::Type});
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method method() → dynamic {
|
||||
core::int v1 = 42;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = "The string!" as{ForNonNullableByDefault} dynamic;
|
||||
if(!(let final dynamic #t1 = v1 = #0#0 as{ForNonNullableByDefault} core::int in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(v1);
|
||||
core::print(v1.{core::Object::runtimeType}{core::Type});
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method method() → dynamic {
|
||||
core::int v1 = 42;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = "The string!" as{ForNonNullableByDefault} dynamic;
|
||||
if(!(let final dynamic #t1 = v1 = #0#0 as{ForNonNullableByDefault} core::int in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(v1);
|
||||
core::print(v1.{core::Object::runtimeType}{core::Type});
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method method() → dynamic {
|
||||
core::int v1 = 42;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = "The string!" as{ForNonNullableByDefault} dynamic;
|
||||
if(!(let final core::int #t1 = v1 = #0#0 as{ForNonNullableByDefault} core::int in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
core::print(v1);
|
||||
core::print(v1.{core::Object::runtimeType}{core::Type});
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1() → dynamic {
|
||||
core::num b = 0;
|
||||
|
@ -10,7 +9,7 @@ static method test1() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14);
|
||||
if(!(let final dynamic #t1 = b = #0#0{(core::double)}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -21,7 +20,7 @@ static method test2() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14, {foo: "foo"});
|
||||
if(!(let final dynamic #t2 = b = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ static method test3() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = ({foo: 3.14});
|
||||
if(!(let final dynamic #t3 = b = #0#0{({foo: core::double})}.foo{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1() → dynamic {
|
||||
core::num b = 0;
|
||||
|
@ -10,7 +9,7 @@ static method test1() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14);
|
||||
if(!(let final core::double #t1 = b = #0#0{(core::double)}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -21,7 +20,7 @@ static method test2() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14, {foo: "foo"});
|
||||
if(!(let final core::double #t2 = b = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ static method test3() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = ({foo: 3.14});
|
||||
if(!(let final core::double #t3 = b = #0#0{({foo: core::double})}.foo{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1() → dynamic {
|
||||
core::num b = 0;
|
||||
|
@ -10,7 +9,7 @@ static method test1() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14);
|
||||
if(!(let final dynamic #t1 = b = #0#0{(core::double)}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -21,7 +20,7 @@ static method test2() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14, {foo: "foo"});
|
||||
if(!(let final dynamic #t2 = b = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ static method test3() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = ({foo: 3.14});
|
||||
if(!(let final dynamic #t3 = b = #0#0{({foo: core::double})}.foo{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1() → dynamic {
|
||||
core::num b = 0;
|
||||
|
@ -10,7 +9,7 @@ static method test1() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14);
|
||||
if(!(let final dynamic #t1 = b = #0#0{(core::double)}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -21,7 +20,7 @@ static method test2() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14, {foo: "foo"});
|
||||
if(!(let final dynamic #t2 = b = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ static method test3() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = ({foo: 3.14});
|
||||
if(!(let final dynamic #t3 = b = #0#0{({foo: core::double})}.foo{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1() → dynamic {
|
||||
core::num b = 0;
|
||||
|
@ -10,7 +9,7 @@ static method test1() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14);
|
||||
if(!(let final core::double #t1 = b = #0#0{(core::double)}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -21,7 +20,7 @@ static method test2() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = (3.14, {foo: "foo"});
|
||||
if(!(let final core::double #t2 = b = #0#0{(core::double, {foo: core::String})}.$1{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
@ -32,7 +31,7 @@ static method test3() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = ({foo: 3.14});
|
||||
if(!(let final core::double #t3 = b = #0#0{({foo: core::double})}.foo{core::double} in true))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return b;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -54,7 +53,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
(a, int b, final int c) = x;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
|
@ -62,7 +61,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
[a, final d] = y;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -79,7 +78,7 @@ Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
Class(field1: a, field2: [[var e, _], [1, var f]]) = z;
|
||||
^"))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -54,7 +53,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
(a, int b, final int c) = x;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
|
@ -62,7 +61,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
[a, final d] = y;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -85,7 +84,7 @@ Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
Class(field1: a, field2: [[var e, _], [1, var f]]) = z;
|
||||
^"))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -54,7 +53,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
(a, int b, final int c) = x;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
|
@ -62,7 +61,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
[a, final d] = y;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -79,7 +78,7 @@ Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
Class(field1: a, field2: [[var e, _], [1, var f]]) = z;
|
||||
^"))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -54,7 +53,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
(a, int b, final int c) = x;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
|
@ -62,7 +61,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
[a, final d] = y;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -79,7 +78,7 @@ Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
Class(field1: a, field2: [[var e, _], [1, var f]]) = z;
|
||||
^"))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -54,7 +53,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
(a, int b, final int c) = x;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
|
@ -62,7 +61,7 @@ Try using a preexisting variable or changing the assignment to a pattern variabl
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
[a, final d] = y;
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -85,7 +84,7 @@ Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
|||
Try using a preexisting variable or changing the assignment to a pattern variable declaration.
|
||||
Class(field1: a, field2: [[var e, _], [1, var f]]) = z;
|
||||
^"))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -55,14 +54,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:32:7: Error: Late final variable 'initializedLateFinal' definitely assigned.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t1 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = definitelyUnassignedLateFinal = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true) && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -74,7 +73,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3 is{ForNonNullableByDefault} core::List<dynamic> && #2#3{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9 is{ForNonNullableByDefault} core::List<dynamic> && #2#9{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16 is{ForNonNullableByDefault} core::List<dynamic> && #2#16{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t4 = notDefinitelyAssignedLateFinal = #2#16{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -55,14 +54,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:32:7: Error: Late final variable 'initializedLateFinal' definitely assigned.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^" && (let final core::Object? #t1 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t2 = definitelyUnassignedLateFinal = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true) && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -80,7 +79,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3 is{ForNonNullableByDefault} core::List<dynamic> && #2#3{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9 is{ForNonNullableByDefault} core::List<dynamic> && #2#9{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16 is{ForNonNullableByDefault} core::List<dynamic> && #2#16{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t4 = notDefinitelyAssignedLateFinal = #2#16{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -55,14 +54,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:32:7: Error: Late final variable 'initializedLateFinal' definitely assigned.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t1 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = definitelyUnassignedLateFinal = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true) && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -74,7 +73,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3 is{ForNonNullableByDefault} core::List<dynamic> && #2#3{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9 is{ForNonNullableByDefault} core::List<dynamic> && #2#9{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16 is{ForNonNullableByDefault} core::List<dynamic> && #2#16{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t4 = notDefinitelyAssignedLateFinal = #2#16{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -55,14 +54,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:32:7: Error: Late final variable 'initializedLateFinal' definitely assigned.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^" && (let final dynamic #t1 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t2 = definitelyUnassignedLateFinal = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true) && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -74,7 +73,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3 is{ForNonNullableByDefault} core::List<dynamic> && #2#3{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9 is{ForNonNullableByDefault} core::List<dynamic> && #2#9{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16 is{ForNonNullableByDefault} core::List<dynamic> && #2#16{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t4 = notDefinitelyAssignedLateFinal = #2#16{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
field dynamic field1 = null;
|
||||
|
@ -55,14 +54,14 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^" && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:32:7: Error: Late final variable 'initializedLateFinal' definitely assigned.
|
||||
initializedLateFinal, // Error
|
||||
^^^^^^^^^^^^^^^^^^^^" && (let final core::Object? #t1 = definitelyUnassignedFinal = #0#0{(core::Object?, core::Object?, core::Object?)}.$3{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
block {
|
||||
final synthesized dynamic #1#0 = y;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t2 = definitelyUnassignedLateFinal = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true) && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:35:5: Error: Final variable 'definitelyAssignedFinal' might already be assigned at this point.
|
||||
definitelyAssignedFinal] = y; // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
block {
|
||||
final synthesized dynamic #2#0 = z;
|
||||
|
@ -80,7 +79,7 @@ static method method(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
^^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#3 is{ForNonNullableByDefault} core::List<dynamic> && #2#3{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (#2#9 is{ForNonNullableByDefault} core::List<dynamic> && #2#9{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && invalid-expression "pkg/front_end/testcases/patterns/pattern_assignment_final.dart:37:17: Error: Final variable 'notDefinitelyAssignedFinal' might already be assigned at this point.
|
||||
field2: [[notDefinitelyAssignedFinal, _], // Error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^") && (#2#16 is{ForNonNullableByDefault} core::List<dynamic> && #2#16{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t4 = notDefinitelyAssignedLateFinal = #2#16{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#2#0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Super extends core::Object {
|
||||
field dynamic superField = null;
|
||||
|
@ -43,7 +42,7 @@ class Class extends self::Super {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = o;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} (core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?) && (let final dynamic #t1 = local = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$1{core::Object?} in true) && (let final dynamic #t2 = parameter = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$2{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Super extends core::Object {
|
||||
field dynamic superField = null;
|
||||
|
@ -43,7 +42,7 @@ class Class extends self::Super {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = o;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} (core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?) && (let final core::Object? #t1 = local = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$1{core::Object?} in true) && (let final core::Object? #t2 = parameter = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$2{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Super extends core::Object {
|
||||
field dynamic superField = null;
|
||||
|
@ -43,7 +42,7 @@ class Class extends self::Super {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = o;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} (core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?) && (let final dynamic #t1 = local = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$1{core::Object?} in true) && (let final dynamic #t2 = parameter = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$2{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Super extends core::Object {
|
||||
field dynamic superField = null;
|
||||
|
@ -43,7 +42,7 @@ class Class extends self::Super {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = o;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} (core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?) && (let final dynamic #t1 = local = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$1{core::Object?} in true) && (let final dynamic #t2 = parameter = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$2{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Super extends core::Object {
|
||||
field dynamic superField = null;
|
||||
|
@ -43,7 +42,7 @@ class Class extends self::Super {
|
|||
block {
|
||||
final synthesized dynamic #0#0 = o;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} (core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?) && (let final core::Object? #t1 = local = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$1{core::Object?} in true) && (let final core::Object? #t2 = parameter = #0#0{(core::Object?, core::Object?, core::Object?, core::Object?, core::Object?, core::Object?)}.$2{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -154,7 +153,7 @@ static method duplicateAssignmentPatternVariable(core::List<core::String> list)
|
|||
Try renaming the variable.
|
||||
[a, a] = list; // Error
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
static method duplicateRecordPatternField(dynamic o) → dynamic {
|
||||
|
|
|
@ -89,7 +89,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -154,7 +153,7 @@ static method duplicateAssignmentPatternVariable(core::List<core::String> list)
|
|||
Try renaming the variable.
|
||||
[a, a] = list; // Error
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
static method duplicateRecordPatternField(dynamic o) → dynamic {
|
||||
|
|
|
@ -89,7 +89,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -154,7 +153,7 @@ static method duplicateAssignmentPatternVariable(core::List<core::String> list)
|
|||
Try renaming the variable.
|
||||
[a, a] = list; // Error
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
static method duplicateRecordPatternField(dynamic o) → dynamic {
|
||||
|
|
|
@ -89,7 +89,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -154,7 +153,7 @@ static method duplicateAssignmentPatternVariable(core::List<core::String> list)
|
|||
Try renaming the variable.
|
||||
[a, a] = list; // Error
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
static method duplicateRecordPatternField(dynamic o) → dynamic {
|
||||
|
|
|
@ -89,7 +89,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
class Class extends core::Object {
|
||||
synthetic constructor •() → self::Class
|
||||
|
@ -154,7 +153,7 @@ static method duplicateAssignmentPatternVariable(core::List<core::String> list)
|
|||
Try renaming the variable.
|
||||
[a, a] = list; // Error
|
||||
^"))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
static method duplicateRecordPatternField(dynamic o) → dynamic {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method sideEffect<T extends core::Object? = dynamic>(core::List<self::sideEffect::T%> list) → core::List<self::sideEffect::T%> {
|
||||
core::print(self::sideEffect::T%);
|
||||
|
@ -16,7 +15,7 @@ static method method() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::List<dynamic> #2#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method sideEffect<T extends core::Object? = dynamic>(core::List<self::sideEffect::T%> list) → core::List<self::sideEffect::T%> {
|
||||
core::print(self::sideEffect::T%);
|
||||
|
@ -16,7 +15,7 @@ static method method() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = self::sideEffect<dynamic>(core::_GrowableList::•<dynamic>(0));
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::List<dynamic> #2#0 = self::sideEffect<dynamic>(core::_GrowableList::•<dynamic>(0));
|
||||
|
|
|
@ -16,7 +16,7 @@ static method method() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::List<dynamic> #2#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
|
|
|
@ -16,7 +16,7 @@ static method method() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::List<dynamic> #2#0 = self::sideEffect<dynamic>(<dynamic>[]);
|
||||
|
|
|
@ -16,7 +16,7 @@ static method method() → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #1#0 = self::sideEffect<dynamic>(core::_GrowableList::•<dynamic>(0));
|
||||
if(!true)
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
{
|
||||
final synthesized core::List<dynamic> #2#0 = self::sideEffect<dynamic>(core::_GrowableList::•<dynamic>(0));
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1(dynamic x) → dynamic {
|
||||
core::int a;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = x;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t1 = a = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return a;
|
||||
}
|
||||
|
@ -21,10 +20,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final synthesized dynamic #0#0 = x;
|
||||
late final synthesized dynamic #0#6 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && ((let final dynamic #t2 = a = #0#6 as{ForNonNullableByDefault} core::int in true) && (let final dynamic #t3 = b = #0#6{core::int} in true))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && (let final dynamic #t4 = c = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
return a.{core::num::+}(b){(core::num) → core::int}.{core::num::+}(c){(core::num) → core::int};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1(dynamic x) → dynamic {
|
||||
core::int a;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = x;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t1 = a = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return a;
|
||||
}
|
||||
|
@ -23,10 +22,10 @@ static method test2(dynamic x) → dynamic {
|
|||
return #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
late final synthesized dynamic #0#6 = ##0#6#initializer(){() → dynamic};
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && ((let final core::int #t2 = a = #0#6 as{ForNonNullableByDefault} core::int in true) && (let final core::int #t3 = b = #0#6{core::int} in true))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && (let final core::int #t4 = c = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
return a.{core::num::+}(b){(core::num) → core::int}.{core::num::+}(c){(core::num) → core::int};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1(dynamic x) → dynamic {
|
||||
core::int a;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = x;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t1 = a = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return a;
|
||||
}
|
||||
|
@ -21,10 +20,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final synthesized dynamic #0#0 = x;
|
||||
late final synthesized dynamic #0#6 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && ((let final dynamic #t2 = a = #0#6 as{ForNonNullableByDefault} core::int in true) && (let final dynamic #t3 = b = #0#6{core::int} in true))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && (let final dynamic #t4 = c = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
return a.{core::num::+}(b){(core::num) → core::int}.{core::num::+}(c){(core::num) → core::int};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1(dynamic x) → dynamic {
|
||||
core::int a;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = x;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final dynamic #t1 = a = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return a;
|
||||
}
|
||||
|
@ -21,10 +20,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final synthesized dynamic #0#0 = x;
|
||||
late final synthesized dynamic #0#6 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && ((let final dynamic #t2 = a = #0#6 as{ForNonNullableByDefault} core::int in true) && (let final dynamic #t3 = b = #0#6{core::int} in true))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && (let final dynamic #t4 = c = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
return a.{core::num::+}(b){(core::num) → core::int}.{core::num::+}(c){(core::num) → core::int};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
static method test1(dynamic x) → dynamic {
|
||||
core::int a;
|
||||
block {
|
||||
final synthesized dynamic #0#0 = x;
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1 && (let final core::int #t1 = a = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
return a;
|
||||
}
|
||||
|
@ -23,10 +22,10 @@ static method test2(dynamic x) → dynamic {
|
|||
return #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
late final synthesized dynamic #0#6 = ##0#6#initializer(){() → dynamic};
|
||||
if(!(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && ((let final core::int #t2 = a = #0#6 as{ForNonNullableByDefault} core::int in true) && (let final core::int #t3 = b = #0#6{core::int} in true))))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
if(!(#1#0 is{ForNonNullableByDefault} core::List<dynamic> && #1#0{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::>=}(#C1){(core::num) → core::bool} && (let final core::int #t4 = c = #1#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic} as{ForNonNullableByDefault} core::int in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#1#0;
|
||||
return a.{core::num::+}(b){(core::num) → core::int}.{core::num::+}(c){(core::num) → core::int};
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
abstract class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
|
@ -74,11 +73,11 @@ static method test(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #4#0 = y;
|
||||
if(!(#4#0 is{ForNonNullableByDefault} self::A && (let final dynamic #t15 = qux = #4#0{self::A}.{self::A::qux}{core::bool} in true) && (let final dynamic #t16 = quux = #4#0{self::A}.{self::A::quux}{core::String} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#4#0;
|
||||
block {
|
||||
final synthesized dynamic #5#0 = z;
|
||||
if(!(#5#0 is{ForNonNullableByDefault} (core::Object?, {quux: core::Object?}) && (let final dynamic #t17 = qux = #5#0{(core::Object?, {quux: core::Object?})}.$1{core::Object?} in true) && (let final dynamic #t18 = quux = #5#0{(core::Object?, {quux: core::Object?})}.quux{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#5#0;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
abstract class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
|
@ -86,11 +85,11 @@ static method test(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #4#0 = y;
|
||||
if(!(#4#0 is{ForNonNullableByDefault} self::A && (let final core::bool #t15 = qux = #4#0{self::A}.{self::A::qux}{core::bool} in true) && (let final core::String #t16 = quux = #4#0{self::A}.{self::A::quux}{core::String} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#4#0;
|
||||
block {
|
||||
final synthesized dynamic #5#0 = z;
|
||||
if(!(#5#0 is{ForNonNullableByDefault} (core::Object?, {quux: core::Object?}) && (let final core::Object? #t17 = qux = #5#0{(core::Object?, {quux: core::Object?})}.$1{core::Object?} in true) && (let final core::Object? #t18 = quux = #5#0{(core::Object?, {quux: core::Object?})}.quux{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#5#0;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
abstract class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
|
@ -74,11 +73,11 @@ static method test(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #4#0 = y;
|
||||
if(!(#4#0 is{ForNonNullableByDefault} self::A && (let final dynamic #t15 = qux = #4#0{self::A}.{self::A::qux}{core::bool} in true) && (let final dynamic #t16 = quux = #4#0{self::A}.{self::A::quux}{core::String} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#4#0;
|
||||
block {
|
||||
final synthesized dynamic #5#0 = z;
|
||||
if(!(#5#0 is{ForNonNullableByDefault} (core::Object?, {quux: core::Object?}) && (let final dynamic #t17 = qux = #5#0{(core::Object?, {quux: core::Object?})}.$1{core::Object?} in true) && (let final dynamic #t18 = quux = #5#0{(core::Object?, {quux: core::Object?})}.quux{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#5#0;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
abstract class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
|
@ -74,11 +73,11 @@ static method test(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #4#0 = y;
|
||||
if(!(#4#0 is{ForNonNullableByDefault} self::A && (let final dynamic #t15 = qux = #4#0{self::A}.{self::A::qux}{core::bool} in true) && (let final dynamic #t16 = quux = #4#0{self::A}.{self::A::quux}{core::String} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#4#0;
|
||||
block {
|
||||
final synthesized dynamic #5#0 = z;
|
||||
if(!(#5#0 is{ForNonNullableByDefault} (core::Object?, {quux: core::Object?}) && (let final dynamic #t17 = qux = #5#0{(core::Object?, {quux: core::Object?})}.$1{core::Object?} in true) && (let final dynamic #t18 = quux = #5#0{(core::Object?, {quux: core::Object?})}.quux{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#5#0;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
import "dart:_internal" as _in;
|
||||
|
||||
abstract class A extends core::Object {
|
||||
synthetic constructor •() → self::A
|
||||
|
@ -86,11 +85,11 @@ static method test(dynamic x, dynamic y, dynamic z) → dynamic {
|
|||
block {
|
||||
final synthesized dynamic #4#0 = y;
|
||||
if(!(#4#0 is{ForNonNullableByDefault} self::A && (let final core::bool #t15 = qux = #4#0{self::A}.{self::A::qux}{core::bool} in true) && (let final core::String #t16 = quux = #4#0{self::A}.{self::A::quux}{core::String} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#4#0;
|
||||
block {
|
||||
final synthesized dynamic #5#0 = z;
|
||||
if(!(#5#0 is{ForNonNullableByDefault} (core::Object?, {quux: core::Object?}) && (let final core::Object? #t17 = qux = #5#0{(core::Object?, {quux: core::Object?})}.$1{core::Object?} in true) && (let final core::Object? #t18 = quux = #5#0{(core::Object?, {quux: core::Object?})}.quux{core::Object?} in true)))
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#5#0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ library /*isNonNullableByDefault*/;
|
|||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic {
|
||||
block {
|
||||
|
@ -17,6 +17,6 @@ static method main() → dynamic {
|
|||
Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
||||
(null) = null;
|
||||
^")
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ library /*isNonNullableByDefault*/;
|
|||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic {
|
||||
block {
|
||||
|
@ -17,6 +17,6 @@ static method main() → dynamic {
|
|||
Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
||||
(null) = null;
|
||||
^")
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ library /*isNonNullableByDefault*/;
|
|||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic {
|
||||
block {
|
||||
|
@ -17,6 +17,6 @@ static method main() → dynamic {
|
|||
Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
||||
(null) = null;
|
||||
^")
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ library /*isNonNullableByDefault*/;
|
|||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic {
|
||||
block {
|
||||
|
@ -17,6 +17,6 @@ static method main() → dynamic {
|
|||
Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
||||
(null) = null;
|
||||
^")
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ library /*isNonNullableByDefault*/;
|
|||
// ^
|
||||
//
|
||||
import self as self;
|
||||
import "dart:_internal" as _in;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method main() → dynamic {
|
||||
block {
|
||||
|
@ -17,6 +17,6 @@ static method main() → dynamic {
|
|||
Try using an if-case, a 'switch' statement, or a 'switch' expression instead.
|
||||
(null) = null;
|
||||
^")
|
||||
throw new _in::ReachabilityError::•();
|
||||
throw new core::StateError::•("Pattern matching error");
|
||||
} =>#0#0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue