blob: 8199e4062345402518dbb7c22b73dcd477cbc3a9 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/cascade.dart:26:5: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
// - 'List' is from 'dart:core'.
// [1]
// ^
//
// pkg/front_end/testcases/general/cascade.dart:28:13: Error: The getter 'last' isn't defined for the class 'int'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'last'.
// ..first.last.toString()
// ^^^^
//
// pkg/front_end/testcases/general/cascade.dart:29:12: Error: The operator '[]' isn't defined for the class 'int'.
// Try correcting the operator to an existing operator, or defining a '[]' operator.
// ..first[0].toString()
// ^
//
// pkg/front_end/testcases/general/cascade.dart:30:11: Error: The getter 'last' isn't defined for the class 'int'.
// Try correcting the name to the name of an existing getter, or defining a getter or field named 'last'.
// ..[0].last.toString();
// ^^^^
//
import self as self;
import "dart:core" as core;
static method main() dynamic {
core::List<core::int> list = let final core::List<core::int> #t1 = core::_GrowableList::_literal1<core::int>(1) in block {
#t1.{core::List::add}(2){(core::int) → void};
#t1.{core::List::add}(3){(core::int) → void};
#t1.{core::List::addAll}(core::_GrowableList::_literal2<core::int>(4, 5)){(core::Iterable<core::int>) → void};
} =>#t1;
core::print(list);
let final core::List<core::int> #t2 = list in block {
#t2.{core::List::add}(2){(core::int) → void};
#t2.{core::List::length}{core::int};
#t2.{core::List::length} = 0;
} =>#t2;
core::print(list);
let final core::List<core::int> #t3 = list in block {
#t3.{core::List::add}(2){(core::int) → void};
#t3.{core::List::[]}(0){(core::int) → core::int};
#t3.{core::List::[]=}(0, 87){(core::int, core::int) → void};
} =>#t3;
core::print(list);
list = let final core::List<core::int> #t4 = core::_GrowableList::_literal1<core::int>(invalid-expression "pkg/front_end/testcases/general/cascade.dart:26:5: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- 'List' is from 'dart:core'.
[1]
^" in core::_GrowableList::_literal1<core::int>(1) as{TypeError,ForNonNullableByDefault} core::int) in block {
invalid-expression "pkg/front_end/testcases/general/cascade.dart:28:13: Error: The getter 'last' isn't defined for the class 'int'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'last'.
..first.last.toString()
^^^^" in #t4.{core::Iterable::first}{core::int}{<unresolved>}.last.{core::Object::toString}(){() → core::String};
invalid-expression "pkg/front_end/testcases/general/cascade.dart:29:12: Error: The operator '[]' isn't defined for the class 'int'.
Try correcting the operator to an existing operator, or defining a '[]' operator.
..first[0].toString()
^" in #t4.{core::Iterable::first}{core::int}{<unresolved>}.[](0).{core::Object::toString}(){() → core::String};
invalid-expression "pkg/front_end/testcases/general/cascade.dart:30:11: Error: The getter 'last' isn't defined for the class 'int'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'last'.
..[0].last.toString();
^^^^" in #t4.{core::List::[]}(0){(core::int) → core::int}{<unresolved>}.last.{core::Object::toString}(){() → core::String};
} =>#t4;
core::print(list);
}