| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/patterns/issue51710.dart:8:4: Error: Can't assign to the final variable 'b'. |
| // (b, a) = (a, b); |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/issue51710.dart:8:7: Error: Can't assign to the final variable 'a'. |
| // (b, a) = (a, b); |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| static method test() → void { |
| final hoisted has-declared-initializer core::String a; |
| final hoisted has-declared-initializer core::String b; |
| { |
| final synthesized(core::String, core::String) #0#0 = ("left", "right"); |
| a = #0#0.$1{core::String}; |
| b = #0#0.$2{core::String}; |
| } |
| core::print("${a} ${b}"); |
| { |
| final synthesized(core::String, core::String) #1#0 = (a, b); |
| if(!(invalid-expression "pkg/front_end/testcases/patterns/issue51710.dart:8:4: Error: Can't assign to the final variable 'b'. |
| (b, a) = (a, b); |
| ^" && invalid-expression "pkg/front_end/testcases/patterns/issue51710.dart:8:7: Error: Can't assign to the final variable 'a'. |
| (b, a) = (a, b); |
| ^")) |
| throw{for-error-handling} new core::StateError::•("Pattern matching error"); |
| } |
| core::print("${a} ${b}"); |
| } |
| |
| |
| Extra constant evaluation status: |
| Evaluated: RecordLiteral @ org-dartlang-testcase:///issue51710.dart:6:18 -> RecordConstant(const ("left", "right")) |
| Extra constant evaluation: evaluated: 22, effectively constant: 1 |