| library /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:core" as core; |
| import "cache_lookups_lib.dart" as cac; |
| |
| import "org-dartlang-testcase:///cache_lookups_lib.dart"; |
| |
| class Class extends core::Object { |
| synthetic constructor •() → self::Class |
| : super core::Object::•() |
| ; |
| get field() → core::int { |
| self::counter = self::counter.{core::num::+}(1){(core::num) → core::int}; |
| return 42; |
| } |
| } |
| static field core::int counter = 0; |
| static method test(dynamic o) → dynamic { |
| #L1: |
| { |
| core::int a; |
| final synthesized dynamic #0#0 = o; |
| late final synthesized core::int #0#2 = #0#0{self::Class}.{self::Class::field}{core::int}; |
| late final synthesized core::bool #0#10 = #0#0{core::List<dynamic>}.{core::List::length}{core::int} =={core::num::==}{(core::Object) → core::bool} #C1; |
| late final synthesized dynamic #0#12 = #0#0{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic}; |
| late final synthesized dynamic #0#13 = #0#0{core::List<dynamic>}.{core::List::[]}(1){(core::int) → dynamic}; |
| if(#0#0 is{ForNonNullableByDefault} self::Class && #C2 =={core::num::==}{(core::Object) → core::bool} #0#2 || #0#0 is{ForNonNullableByDefault} self::Class && #C3 =={core::num::==}{(core::Object) → core::bool} #0#2) { |
| { |
| core::print("Class"); |
| break #L1; |
| } |
| } |
| else |
| if(#0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#10 && (#0#12 is{ForNonNullableByDefault} core::int && (let final dynamic #t1 = a = #0#12{core::int} in true)) && #C3 =={core::num::==}{(core::Object) → core::bool} #0#13 || #0#0 is{ForNonNullableByDefault} core::List<dynamic> && #0#10 && (#0#12 is{ForNonNullableByDefault} core::int && (let final dynamic #t2 = a = #0#12{core::int} in true)) && #C1 =={core::num::==}{(core::Object) → core::bool} #0#13) { |
| { |
| core::print("List"); |
| } |
| } |
| } |
| } |
| static method main() → dynamic { |
| self::expect(0, self::counter); |
| self::test(null); |
| self::expect(0, self::counter); |
| self::test(new self::Class::•()); |
| self::expect(1, self::counter); |
| self::test(new cac::CustomList::•<core::int>(<core::int>[0, 1])); |
| self::expect(2, self::counter); |
| self::test(new cac::CustomList::•<core::int>(<core::int>[0, 2])); |
| self::expect(3, self::counter); |
| self::test(new cac::CustomList::•<core::int>(<core::int>[0, 3])); |
| self::expect(4, self::counter); |
| } |
| static method expect(dynamic expected, dynamic actual) → dynamic { |
| if(!(expected =={core::Object::==}{(core::Object) → core::bool} actual)) |
| throw "Expected ${expected}, actual ${actual}"; |
| } |
| |
| library /*isNonNullableByDefault*/; |
| import self as cac; |
| import "dart:core" as core; |
| import "dart:collection" as col; |
| import "dart:math" as math; |
| import "cache_lookups.dart" as self; |
| |
| import "dart:collection"; |
| import "org-dartlang-testcase:///cache_lookups.dart"; |
| |
| abstract class _CustomList&Object&ListMixin<E extends core::Object? = dynamic> = core::Object with col::ListMixin<cac::_CustomList&Object&ListMixin::E%> /*isAnonymousMixin,hasConstConstructor*/ { |
| const synthetic constructor •() → cac::_CustomList&Object&ListMixin<cac::_CustomList&Object&ListMixin::E%> |
| : super core::Object::•() |
| ; |
| mixin-super-stub get first() → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::first}; |
| mixin-super-stub set first(covariant-by-class cac::_CustomList&Object&ListMixin::E% value) → void |
| return super.{col::ListMixin::first} = value; |
| mixin-super-stub get last() → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::last}; |
| mixin-super-stub set last(covariant-by-class cac::_CustomList&Object&ListMixin::E% value) → void |
| return super.{col::ListMixin::last} = value; |
| mixin-super-stub get iterator() → core::Iterator<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::iterator}; |
| mixin-super-stub method elementAt(core::int index) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::elementAt}(index); |
| mixin-super-stub method followedBy(covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> other) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::followedBy}(other); |
| mixin-super-stub method forEach((cac::_CustomList&Object&ListMixin::E%) → void action) → void |
| return super.{col::ListMixin::forEach}(action); |
| mixin-super-stub get isEmpty() → core::bool |
| return super.{col::ListMixin::isEmpty}; |
| mixin-super-stub get isNotEmpty() → core::bool |
| return super.{col::ListMixin::isNotEmpty}; |
| mixin-super-stub get single() → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::single}; |
| mixin-super-stub method contains(core::Object? element) → core::bool |
| return super.{col::ListMixin::contains}(element); |
| mixin-super-stub method every((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → core::bool |
| return super.{col::ListMixin::every}(test); |
| mixin-super-stub method any((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → core::bool |
| return super.{col::ListMixin::any}(test); |
| mixin-super-stub method firstWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test, {covariant-by-class () →? cac::_CustomList&Object&ListMixin::E% orElse = #C4}) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::firstWhere}(test, orElse: orElse); |
| mixin-super-stub method lastWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test, {covariant-by-class () →? cac::_CustomList&Object&ListMixin::E% orElse = #C4}) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::lastWhere}(test, orElse: orElse); |
| mixin-super-stub method singleWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test, {covariant-by-class () →? cac::_CustomList&Object&ListMixin::E% orElse = #C4}) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::singleWhere}(test, orElse: orElse); |
| mixin-super-stub method join([core::String separator = #C5]) → core::String |
| return super.{col::ListMixin::join}(separator); |
| mixin-super-stub method where((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::where}(test); |
| mixin-super-stub method whereType<T extends core::Object? = dynamic>() → core::Iterable<cac::_CustomList&Object&ListMixin::whereType::T%> |
| return super.{col::ListMixin::whereType}<cac::_CustomList&Object&ListMixin::whereType::T%>(); |
| mixin-super-stub method map<T extends core::Object? = dynamic>((cac::_CustomList&Object&ListMixin::E%) → cac::_CustomList&Object&ListMixin::map::T% f) → core::Iterable<cac::_CustomList&Object&ListMixin::map::T%> |
| return super.{col::ListMixin::map}<cac::_CustomList&Object&ListMixin::map::T%>(f); |
| mixin-super-stub method expand<T extends core::Object? = dynamic>((cac::_CustomList&Object&ListMixin::E%) → core::Iterable<cac::_CustomList&Object&ListMixin::expand::T%> f) → core::Iterable<cac::_CustomList&Object&ListMixin::expand::T%> |
| return super.{col::ListMixin::expand}<cac::_CustomList&Object&ListMixin::expand::T%>(f); |
| mixin-super-stub method reduce(covariant-by-class (cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) → cac::_CustomList&Object&ListMixin::E% combine) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::reduce}(combine); |
| mixin-super-stub method fold<T extends core::Object? = dynamic>(cac::_CustomList&Object&ListMixin::fold::T% initialValue, (cac::_CustomList&Object&ListMixin::fold::T%, cac::_CustomList&Object&ListMixin::E%) → cac::_CustomList&Object&ListMixin::fold::T% combine) → cac::_CustomList&Object&ListMixin::fold::T% |
| return super.{col::ListMixin::fold}<cac::_CustomList&Object&ListMixin::fold::T%>(initialValue, combine); |
| mixin-super-stub method skip(core::int count) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::skip}(count); |
| mixin-super-stub method skipWhile((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::skipWhile}(test); |
| mixin-super-stub method take(core::int count) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::take}(count); |
| mixin-super-stub method takeWhile((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::takeWhile}(test); |
| mixin-super-stub method toList({core::bool growable = #C6}) → core::List<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::toList}(growable: growable); |
| mixin-super-stub method toSet() → core::Set<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::toSet}(); |
| mixin-super-stub method add(covariant-by-class cac::_CustomList&Object&ListMixin::E% element) → void |
| return super.{col::ListMixin::add}(element); |
| mixin-super-stub method addAll(covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> iterable) → void |
| return super.{col::ListMixin::addAll}(iterable); |
| mixin-super-stub method remove(core::Object? element) → core::bool |
| return super.{col::ListMixin::remove}(element); |
| mixin-super-stub method _closeGap(core::int start, core::int end) → void |
| return super.{col::ListMixin::_closeGap}(start, end); |
| mixin-super-stub method removeWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → void |
| return super.{col::ListMixin::removeWhere}(test); |
| mixin-super-stub method retainWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test) → void |
| return super.{col::ListMixin::retainWhere}(test); |
| mixin-super-stub method _filter((cac::_CustomList&Object&ListMixin::E%) → core::bool test, core::bool retainMatching) → void |
| return super.{col::ListMixin::_filter}(test, retainMatching); |
| mixin-super-stub method clear() → void |
| return super.{col::ListMixin::clear}(); |
| mixin-super-stub method cast<R extends core::Object? = dynamic>() → core::List<cac::_CustomList&Object&ListMixin::cast::R%> |
| return super.{col::ListMixin::cast}<cac::_CustomList&Object&ListMixin::cast::R%>(); |
| mixin-super-stub method removeLast() → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::removeLast}(); |
| mixin-super-stub method sort([(cac::_CustomList&Object&ListMixin::E%, cac::_CustomList&Object&ListMixin::E%) →? core::int compare = #C4]) → void |
| return super.{col::ListMixin::sort}(compare); |
| mixin-super-stub method shuffle([math::Random? random = #C4]) → void |
| return super.{col::ListMixin::shuffle}(random); |
| mixin-super-stub method asMap() → core::Map<core::int, cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::asMap}(); |
| mixin-super-stub operator +(covariant-by-class core::List<cac::_CustomList&Object&ListMixin::E%> other) → core::List<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::+}(other); |
| mixin-super-stub method sublist(core::int start, [core::int? end = #C4]) → core::List<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::sublist}(start, end); |
| mixin-super-stub method getRange(core::int start, core::int end) → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::getRange}(start, end); |
| mixin-super-stub method removeRange(core::int start, core::int end) → void |
| return super.{col::ListMixin::removeRange}(start, end); |
| mixin-super-stub method fillRange(core::int start, core::int end, [covariant-by-class cac::_CustomList&Object&ListMixin::E? fill = #C4]) → void |
| return super.{col::ListMixin::fillRange}(start, end, fill); |
| mixin-super-stub method setRange(core::int start, core::int end, covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> iterable, [core::int skipCount = #C2]) → void |
| return super.{col::ListMixin::setRange}(start, end, iterable, skipCount); |
| mixin-super-stub method replaceRange(core::int start, core::int end, covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> newContents) → void |
| return super.{col::ListMixin::replaceRange}(start, end, newContents); |
| mixin-super-stub method indexOf(covariant-by-class core::Object? element, [core::int start = #C2]) → core::int |
| return super.{col::ListMixin::indexOf}(element, start); |
| mixin-super-stub method indexWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test, [core::int start = #C2]) → core::int |
| return super.{col::ListMixin::indexWhere}(test, start); |
| mixin-super-stub method lastIndexOf(covariant-by-class core::Object? element, [core::int? start = #C4]) → core::int |
| return super.{col::ListMixin::lastIndexOf}(element, start); |
| mixin-super-stub method lastIndexWhere((cac::_CustomList&Object&ListMixin::E%) → core::bool test, [core::int? start = #C4]) → core::int |
| return super.{col::ListMixin::lastIndexWhere}(test, start); |
| mixin-super-stub method insert(core::int index, covariant-by-class cac::_CustomList&Object&ListMixin::E% element) → void |
| return super.{col::ListMixin::insert}(index, element); |
| mixin-super-stub method removeAt(core::int index) → cac::_CustomList&Object&ListMixin::E% |
| return super.{col::ListMixin::removeAt}(index); |
| mixin-super-stub method insertAll(core::int index, covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> iterable) → void |
| return super.{col::ListMixin::insertAll}(index, iterable); |
| mixin-super-stub method setAll(core::int index, covariant-by-class core::Iterable<cac::_CustomList&Object&ListMixin::E%> iterable) → void |
| return super.{col::ListMixin::setAll}(index, iterable); |
| mixin-super-stub get reversed() → core::Iterable<cac::_CustomList&Object&ListMixin::E%> |
| return super.{col::ListMixin::reversed}; |
| mixin-super-stub method toString() → core::String |
| return super.{col::ListMixin::toString}(); |
| } |
| class CustomList<E extends core::Object? = dynamic> extends cac::_CustomList&Object&ListMixin<cac::CustomList::E%> { |
| final field core::List<cac::CustomList::E%> list; |
| constructor •(core::List<cac::CustomList::E%> list) → cac::CustomList<cac::CustomList::E%> |
| : cac::CustomList::list = list, super cac::_CustomList&Object&ListMixin::•() |
| ; |
| get length() → core::int { |
| self::counter = self::counter.{core::num::+}(1){(core::num) → core::int}; |
| return this.{cac::CustomList::list}{core::List<cac::CustomList::E%>}.{core::List::length}{core::int}; |
| } |
| set length(core::int value) → void { |
| this.{cac::CustomList::list}{core::List<cac::CustomList::E%>}.{core::List::length} = value; |
| } |
| operator [](core::int index) → cac::CustomList::E% |
| return this.{cac::CustomList::list}{core::List<cac::CustomList::E%>}.{core::List::[]}(index){(core::int) → cac::CustomList::E%}; |
| operator []=(core::int index, covariant-by-class cac::CustomList::E% value) → void { |
| this.{cac::CustomList::list}{core::List<cac::CustomList::E%>}.{core::List::[]=}(index, value){(core::int, cac::CustomList::E%) → void}; |
| } |
| } |
| |
| constants { |
| #C1 = 2 |
| #C2 = 0 |
| #C3 = 1 |
| #C4 = null |
| #C5 = "" |
| #C6 = true |
| } |