| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:13:28: Error: The set literal type 'Set<dynamic>' isn't of expected type 'LinkedHashSet<int>'. |
| // - 'Set' is from 'dart:core'. |
| // - 'LinkedHashSet' is from 'dart:collection'. |
| // Change the type of the set literal or the context in which it is used. |
| // LinkedHashSet<int> lhs = {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:14:34: Error: The map literal type 'Map<dynamic, dynamic>' isn't of expected type 'LinkedHashMap<int, bool>'. |
| // - 'Map' is from 'dart:core'. |
| // - 'LinkedHashMap' is from 'dart:collection'. |
| // Change the type of the map literal or the context in which it is used. |
| // LinkedHashMap<int, bool> lhm = {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:32:46: Error: The set literal type 'Future<Set<dynamic>>' isn't of expected type 'Future<LinkedHashSet<int>>'. |
| // - 'Future' is from 'dart:async'. |
| // - 'Set' is from 'dart:core'. |
| // - 'LinkedHashSet' is from 'dart:collection'. |
| // Change the type of the set literal or the context in which it is used. |
| // Future<LinkedHashSet<int>> lhsfun() async => {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:33:52: Error: The map literal type 'Future<Map<dynamic, dynamic>>' isn't of expected type 'Future<LinkedHashMap<int, bool>>'. |
| // - 'Future' is from 'dart:async'. |
| // - 'Map' is from 'dart:core'. |
| // - 'LinkedHashMap' is from 'dart:collection'. |
| // Change the type of the map literal or the context in which it is used. |
| // Future<LinkedHashMap<int, bool>> lhmfun() async => {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:38:43: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'FutureOr<LinkedHashSet<int>>'. |
| // - 'Set' is from 'dart:core'. |
| // - 'LinkedHashSet' is from 'dart:collection'. |
| // FutureOr<LinkedHashSet<int>> lhsfun2() => {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:39:49: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'FutureOr<LinkedHashMap<int, bool>>'. |
| // - 'Map' is from 'dart:core'. |
| // - 'LinkedHashMap' is from 'dart:collection'. |
| // FutureOr<LinkedHashMap<int, bool>> lhmfun2() => {}; |
| // ^ |
| // |
| import self as self; |
| import "dart:async" as asy; |
| import "dart:core" as core; |
| import "dart:collection" as col; |
| import "dart:_internal" as _in; |
| |
| import "dart:async" show FutureOr; |
| import "dart:collection" show LinkedHashMap, LinkedHashSet; |
| |
| static method main() → dynamic /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| dynamic :saved_try_context_var0; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L1: |
| { |
| core::Map<core::int*, core::bool*>* m = <core::int*, core::bool*>{}; |
| core::Set<core::int*>* s = block { |
| final core::Set<core::int*>* #t1 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t1; |
| core::Iterable<core::int*>* i = block { |
| final core::Set<core::int*>* #t2 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t2; |
| col::LinkedHashSet<core::int*>* lhs = let final Never* #t3 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:13:28: Error: The set literal type 'Set<dynamic>' isn't of expected type 'LinkedHashSet<int>'. |
| - 'Set' is from 'dart:core'. |
| - 'LinkedHashSet' is from 'dart:collection'. |
| Change the type of the set literal or the context in which it is used. |
| LinkedHashSet<int> lhs = {}; |
| ^" in block { |
| final core::Set<dynamic>* #t4 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| } =>#t4; |
| col::LinkedHashMap<core::int*, core::bool*>* lhm = let final Never* #t5 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:14:34: Error: The map literal type 'Map<dynamic, dynamic>' isn't of expected type 'LinkedHashMap<int, bool>'. |
| - 'Map' is from 'dart:core'. |
| - 'LinkedHashMap' is from 'dart:collection'. |
| Change the type of the map literal or the context in which it is used. |
| LinkedHashMap<int, bool> lhm = {}; |
| ^" in <dynamic, dynamic>{}; |
| [yield] let dynamic #t6 = asy::_awaitHelper(self::mapfun(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Map<core::int*, core::bool*>* fm = _in::unsafeCast<core::Map<core::int*, core::bool*>*>(:result); |
| [yield] let dynamic #t7 = asy::_awaitHelper(self::setfun(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Set<core::int*>* fs = _in::unsafeCast<core::Set<core::int*>*>(:result); |
| [yield] let dynamic #t8 = asy::_awaitHelper(self::iterablefun(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Iterable<core::int*>* fi = _in::unsafeCast<core::Iterable<core::int*>*>(:result); |
| [yield] let dynamic #t9 = asy::_awaitHelper(self::lhsfun(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashSet<core::int*>* flhs = _in::unsafeCast<col::LinkedHashSet<core::int*>*>(:result); |
| [yield] let dynamic #t10 = asy::_awaitHelper(self::lhmfun(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashMap<core::int*, core::bool*>* flhm = _in::unsafeCast<col::LinkedHashMap<core::int*, core::bool*>*>(:result); |
| [yield] let dynamic #t11 = asy::_awaitHelper(self::mapfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Map<core::int*, core::bool*>* fm2 = _in::unsafeCast<core::Map<core::int*, core::bool*>*>(:result); |
| [yield] let dynamic #t12 = asy::_awaitHelper(self::setfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Set<core::int*>* fs2 = _in::unsafeCast<core::Set<core::int*>*>(:result); |
| [yield] let dynamic #t13 = asy::_awaitHelper(self::iterablefun2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Iterable<core::int*>* fi2 = _in::unsafeCast<core::Iterable<core::int*>*>(:result); |
| [yield] let dynamic #t14 = asy::_awaitHelper(self::lhsfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashSet<core::int*>* flhs2 = _in::unsafeCast<col::LinkedHashSet<core::int*>*>(:result); |
| [yield] let dynamic #t15 = asy::_awaitHelper(self::lhmfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashMap<core::int*, core::bool*>* flhm2 = _in::unsafeCast<col::LinkedHashMap<core::int*, core::bool*>*>(:result); |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method mapfun() → asy::Future<core::Map<core::int*, core::bool*>*>* /* originally async */ { |
| final asy::_Future<core::Map<core::int*, core::bool*>*>* :async_future = new asy::_Future::•<core::Map<core::int*, core::bool*>*>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::Map<core::int*, core::bool*>*>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L2: |
| { |
| :return_value = <core::int*, core::bool*>{}; |
| break #L2; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method setfun() → asy::Future<core::Set<core::int*>*>* /* originally async */ { |
| final asy::_Future<core::Set<core::int*>*>* :async_future = new asy::_Future::•<core::Set<core::int*>*>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::Set<core::int*>*>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L3: |
| { |
| :return_value = block { |
| final core::Set<core::int*>* #t16 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t16; |
| break #L3; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method iterablefun() → asy::Future<core::Iterable<core::int*>*>* /* originally async */ { |
| final asy::_Future<core::Iterable<core::int*>*>* :async_future = new asy::_Future::•<core::Iterable<core::int*>*>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::Iterable<core::int*>*>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L4: |
| { |
| :return_value = block { |
| final core::Set<core::int*>* #t17 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t17; |
| break #L4; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method lhsfun() → asy::Future<col::LinkedHashSet<core::int*>*>* /* originally async */ { |
| final asy::_Future<col::LinkedHashSet<core::int*>*>* :async_future = new asy::_Future::•<col::LinkedHashSet<core::int*>*>(); |
| core::bool* :is_sync = false; |
| FutureOr<col::LinkedHashSet<core::int*>*>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L5: |
| { |
| :return_value = let final Never* #t18 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:32:46: Error: The set literal type 'Future<Set<dynamic>>' isn't of expected type 'Future<LinkedHashSet<int>>'. |
| - 'Future' is from 'dart:async'. |
| - 'Set' is from 'dart:core'. |
| - 'LinkedHashSet' is from 'dart:collection'. |
| Change the type of the set literal or the context in which it is used. |
| Future<LinkedHashSet<int>> lhsfun() async => {}; |
| ^" in block { |
| final core::Set<dynamic>* #t19 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| } =>#t19; |
| break #L5; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method lhmfun() → asy::Future<col::LinkedHashMap<core::int*, core::bool*>*>* /* originally async */ { |
| final asy::_Future<col::LinkedHashMap<core::int*, core::bool*>*>* :async_future = new asy::_Future::•<col::LinkedHashMap<core::int*, core::bool*>*>(); |
| core::bool* :is_sync = false; |
| FutureOr<col::LinkedHashMap<core::int*, core::bool*>*>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L6: |
| { |
| :return_value = let final Never* #t20 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:33:52: Error: The map literal type 'Future<Map<dynamic, dynamic>>' isn't of expected type 'Future<LinkedHashMap<int, bool>>'. |
| - 'Future' is from 'dart:async'. |
| - 'Map' is from 'dart:core'. |
| - 'LinkedHashMap' is from 'dart:collection'. |
| Change the type of the map literal or the context in which it is used. |
| Future<LinkedHashMap<int, bool>> lhmfun() async => {}; |
| ^" in <dynamic, dynamic>{}; |
| break #L6; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op.call(); |
| :is_sync = true; |
| return :async_future; |
| } |
| static method mapfun2() → FutureOr<core::Map<core::int*, core::bool*>*>* |
| return <core::int*, core::bool*>{}; |
| static method setfun2() → FutureOr<core::Set<core::int*>*>* |
| return block { |
| final core::Set<core::int*>* #t21 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t21; |
| static method iterablefun2() → FutureOr<core::Iterable<core::int*>*>* |
| return block { |
| final core::Set<core::int*>* #t22 = new col::_CompactLinkedHashSet::•<core::int*>(); |
| } =>#t22; |
| static method lhsfun2() → FutureOr<col::LinkedHashSet<core::int*>*>* |
| return let final Never* #t23 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:38:43: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'FutureOr<LinkedHashSet<int>>'. |
| - 'Set' is from 'dart:core'. |
| - 'LinkedHashSet' is from 'dart:collection'. |
| FutureOr<LinkedHashSet<int>> lhsfun2() => {}; |
| ^" in ( block { |
| final core::Set<dynamic>* #t24 = new col::_CompactLinkedHashSet::•<dynamic>(); |
| } =>#t24) as{TypeError} FutureOr<col::LinkedHashSet<core::int*>*>*; |
| static method lhmfun2() → FutureOr<col::LinkedHashMap<core::int*, core::bool*>*>* |
| return let final Never* #t25 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:39:49: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'FutureOr<LinkedHashMap<int, bool>>'. |
| - 'Map' is from 'dart:core'. |
| - 'LinkedHashMap' is from 'dart:collection'. |
| FutureOr<LinkedHashMap<int, bool>> lhmfun2() => {}; |
| ^" in <dynamic, dynamic>{} as{TypeError} FutureOr<col::LinkedHashMap<core::int*, core::bool*>*>*; |