blob: 358bace7ba8d72ae3e0f4c537db56f2018c023dd [file] [log] [blame]
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:core" as core;
import "dart:collection" as col;
import "dart:async" as asy;
import "dart:async" show FutureOr;
import "dart:collection" show LinkedHashMap, LinkedHashSet;
static method main() dynamic async /* futureValueType= dynamic */ {
core::Map<core::int*, core::bool*>* m = <core::int*, core::bool*>{};
core::Set<core::int*>* s = block {
final core::Set<core::int*>* #t1 = col::LinkedHashSet::•<core::int*>();
} =>#t1;
core::Iterable<core::int*>* i = block {
final core::Set<core::int*>* #t2 = col::LinkedHashSet::•<core::int*>();
} =>#t2;
col::LinkedHashSet<core::int*>* lhs = 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>* #t3 = col::LinkedHashSet::•<dynamic>();
} =>#t3;
col::LinkedHashMap<core::int*, core::bool*>* lhm = 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>{};
core::Map<core::int*, core::bool*>* fm = await self::mapfun();
core::Set<core::int*>* fs = await self::setfun();
core::Iterable<core::int*>* fi = await self::iterablefun();
col::LinkedHashSet<core::int*>* flhs = await self::lhsfun();
col::LinkedHashMap<core::int*, core::bool*>* flhm = await self::lhmfun();
core::Map<core::int*, core::bool*>* fm2 = await self::mapfun2();
core::Set<core::int*>* fs2 = await self::setfun2();
core::Iterable<core::int*>* fi2 = await self::iterablefun2();
col::LinkedHashSet<core::int*>* flhs2 = await self::lhsfun2();
col::LinkedHashMap<core::int*, core::bool*>* flhm2 = await self::lhmfun2();
}
static method mapfun() asy::Future<core::Map<core::int*, core::bool*>*>* async /* futureValueType= core::Map<core::int*, core::bool*>* */
return <core::int*, core::bool*>{};
static method setfun() asy::Future<core::Set<core::int*>*>* async /* futureValueType= core::Set<core::int*>* */
return block {
final core::Set<core::int*>* #t4 = col::LinkedHashSet::•<core::int*>();
} =>#t4;
static method iterablefun() asy::Future<core::Iterable<core::int*>*>* async /* futureValueType= core::Iterable<core::int*>* */
return block {
final core::Set<core::int*>* #t5 = col::LinkedHashSet::•<core::int*>();
} =>#t5;
static method lhsfun() asy::Future<col::LinkedHashSet<core::int*>*>* async /* futureValueType= col::LinkedHashSet<core::int*>* */
return 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>* #t6 = col::LinkedHashSet::•<dynamic>();
} =>#t6;
static method lhmfun() asy::Future<col::LinkedHashMap<core::int*, core::bool*>*>* async /* futureValueType= col::LinkedHashMap<core::int*, core::bool*>* */
return 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>{};
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*>* #t7 = col::LinkedHashSet::•<core::int*>();
} =>#t7;
static method iterablefun2() FutureOr<core::Iterable<core::int*>*>*
return block {
final core::Set<core::int*>* #t8 = col::LinkedHashSet::•<core::int*>();
} =>#t8;
static method lhsfun2() FutureOr<col::LinkedHashSet<core::int*>*>*
return 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>* #t9 = col::LinkedHashSet::•<dynamic>();
} =>#t9) as{TypeError} FutureOr<col::LinkedHashSet<core::int*>*>*;
static method lhmfun2() FutureOr<col::LinkedHashMap<core::int*, core::bool*>*>*
return 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*>*>*;