| 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 '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. |
| // Future<LinkedHashSet<int>> lhsfun() async => {}; |
| // ^ |
| // |
| // pkg/front_end/testcases/set_literals/disambiguation_rule.dart:33:52: 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. |
| // 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'. |
| // - 'FutureOr' is from 'dart:async'. |
| // - 'LinkedHashSet' is from 'dart:collection'. |
| // Try changing the type of the left hand side, or casting the right hand side to 'FutureOr<LinkedHashSet<int>>'. |
| // 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'. |
| // - 'FutureOr' is from 'dart:async'. |
| // - 'LinkedHashMap' is from 'dart:collection'. |
| // Try changing the type of the left hand side, or casting the right hand side to 'FutureOr<LinkedHashMap<int, bool>>'. |
| // 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:async"; |
| import "dart:collection"; |
| |
| static method main() → dynamic /* originally async */ { |
| final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>(); |
| asy::FutureOr<dynamic> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :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 = let final core::Set<core::int> #t1 = col::LinkedHashSet::•<core::int>() in #t1; |
| core::Iterable<core::int> i = let final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>() in #t2; |
| col::LinkedHashSet<core::int> lhs = let final<BottomType> #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 let final core::Set<dynamic> #t4 = col::LinkedHashSet::•<dynamic>() in #t4; |
| col::LinkedHashMap<core::int, core::bool> lhm = let final<BottomType> #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 = :result; |
| [yield] let dynamic #t7 = asy::_awaitHelper(self::setfun(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Set<core::int> fs = :result; |
| [yield] let dynamic #t8 = asy::_awaitHelper(self::iterablefun(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Iterable<core::int> fi = :result; |
| [yield] let dynamic #t9 = asy::_awaitHelper(self::lhsfun(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashSet<core::int> flhs = :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 = :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 = :result; |
| [yield] let dynamic #t12 = asy::_awaitHelper(self::setfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Set<core::int> fs2 = :result; |
| [yield] let dynamic #t13 = asy::_awaitHelper(self::iterablefun2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::Iterable<core::int> fi2 = :result; |
| [yield] let dynamic #t14 = asy::_awaitHelper(self::lhsfun2(), :async_op_then, :async_op_error, :async_op) in null; |
| col::LinkedHashSet<core::int> flhs2 = :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 = :result; |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method mapfun() → asy::Future<core::Map<core::int, core::bool>> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::Map<core::int, core::bool>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Map<core::int, core::bool>>(); |
| asy::FutureOr<core::Map<core::int, core::bool>> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :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_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method setfun() → asy::Future<core::Set<core::int>> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::Set<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Set<core::int>>(); |
| asy::FutureOr<core::Set<core::int>> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L3: |
| { |
| :return_value = let final core::Set<core::int> #t16 = col::LinkedHashSet::•<core::int>() in #t16; |
| break #L3; |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method iterablefun() → asy::Future<core::Iterable<core::int>> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<core::Iterable<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Iterable<core::int>>(); |
| asy::FutureOr<core::Iterable<core::int>> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L4: |
| { |
| :return_value = let final core::Set<core::int> #t17 = col::LinkedHashSet::•<core::int>() in #t17; |
| break #L4; |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method lhsfun() → asy::Future<col::LinkedHashSet<core::int>> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<col::LinkedHashSet<core::int>> :async_completer = new asy::_AsyncAwaitCompleter::•<col::LinkedHashSet<core::int>>(); |
| asy::FutureOr<col::LinkedHashSet<core::int>> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :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<BottomType> #t18 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:32:46: 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. |
| Future<LinkedHashSet<int>> lhsfun() async => {}; |
| ^" in let final core::Set<dynamic> #t19 = col::LinkedHashSet::•<dynamic>() in #t19; |
| break #L5; |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method lhmfun() → asy::Future<col::LinkedHashMap<core::int, core::bool>> /* originally async */ { |
| final asy::_AsyncAwaitCompleter<col::LinkedHashMap<core::int, core::bool>> :async_completer = new asy::_AsyncAwaitCompleter::•<col::LinkedHashMap<core::int, core::bool>>(); |
| asy::FutureOr<col::LinkedHashMap<core::int, core::bool>> :return_value; |
| dynamic :async_stack_trace; |
| dynamic :async_op_then; |
| dynamic :async_op_error; |
| dynamic :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<BottomType> #t20 = invalid-expression "pkg/front_end/testcases/set_literals/disambiguation_rule.dart:33:52: 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. |
| Future<LinkedHashMap<int, bool>> lhmfun() async => {}; |
| ^" in <dynamic, dynamic>{}; |
| break #L6; |
| } |
| asy::_completeOnAsyncReturn(:async_completer, :return_value); |
| return; |
| } |
| on dynamic catch(dynamic :exception, dynamic :stack_trace) { |
| :async_completer.{asy::Completer::completeError}(:exception, :stack_trace); |
| } |
| :async_stack_trace = asy::_asyncStackTraceHelper(:async_op); |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_completer.start(:async_op); |
| return :async_completer.{asy::Completer::future}; |
| } |
| static method mapfun2() → asy::FutureOr<core::Map<core::int, core::bool>> |
| return <core::int, core::bool>{}; |
| static method setfun2() → asy::FutureOr<core::Set<core::int>> |
| return let final core::Set<core::int> #t21 = col::LinkedHashSet::•<core::int>() in #t21; |
| static method iterablefun2() → asy::FutureOr<core::Iterable<core::int>> |
| return let final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>() in #t22; |
| static method lhsfun2() → asy::FutureOr<col::LinkedHashSet<core::int>> |
| return let final<BottomType> #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'. |
| - 'FutureOr' is from 'dart:async'. |
| - 'LinkedHashSet' is from 'dart:collection'. |
| Try changing the type of the left hand side, or casting the right hand side to 'FutureOr<LinkedHashSet<int>>'. |
| FutureOr<LinkedHashSet<int>> lhsfun2() => {}; |
| ^" in (let final core::Set<dynamic> #t24 = col::LinkedHashSet::•<dynamic>() in #t24) as{TypeError} asy::FutureOr<col::LinkedHashSet<core::int>>; |
| static method lhmfun2() → asy::FutureOr<col::LinkedHashMap<core::int, core::bool>> |
| return let final<BottomType> #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'. |
| - 'FutureOr' is from 'dart:async'. |
| - 'LinkedHashMap' is from 'dart:collection'. |
| Try changing the type of the left hand side, or casting the right hand side to 'FutureOr<LinkedHashMap<int, bool>>'. |
| FutureOr<LinkedHashMap<int, bool>> lhmfun2() => {}; |
| ^" in <dynamic, dynamic>{} as{TypeError} asy::FutureOr<col::LinkedHashMap<core::int, core::bool>>; |