blob: 2e8c05ab4567842ab5d143953511887911255299 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
typedef MyList<T extends core::num> = core::List<T>;
static method main() dynamic {}
static method test() dynamic {
const (core::int, core::num, {growable: core::bool}) core::List<core::num> c1 = #C2;
const (core::int, core::num, {growable: core::bool}) core::List<core::num> c2 = #C2;
const (core::int, core::num, {growable: core::bool}) core::List<core::num> c3 = #C4;
const core::bool c4 = #C5;
const core::bool c5 = #C6;
self::expect(true, #C5);
self::expect(false, #C6);
self::expect(true, core::identical(#C2, #C2));
self::expect(false, core::identical(#C2, #C4));
(core::int, core::num, {growable: core::bool}) core::List<core::num> v1 = #C2;
(core::int, core::num, {growable: core::bool}) core::List<core::num> v2 = #C2;
(core::int, core::num, {growable: core::bool}) core::List<core::num> v3 = #C4;
core::bool v4 = core::identical(v1, v2);
core::bool v5 = core::identical(v1, v3);
self::expect(true, v4);
self::expect(false, v5);
self::expect(true, core::identical(v1, v2));
self::expect(false, core::identical(v1, v3));
}
static method expect(dynamic expected, dynamic actual) dynamic {
if(!(expected =={core::Object::==}{(core::Object) core::bool} actual))
throw "Expected ${expected}, actual ${actual}";
}
constants {
#C1 = constructor-tearoff core::List::filled
#C2 = instantiation #C1 <core::num>
#C3 = typedef-tearoff <T extends core::num>.(#C1<T>)
#C4 = instantiation #C3 <core::num>
#C5 = true
#C6 = false
}
Extra constant evaluation status:
Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47462.dart:20:16 -> BoolConstant(true)
Evaluated: StaticInvocation @ org-dartlang-testcase:///issue47462.dart:21:17 -> BoolConstant(false)
Extra constant evaluation: evaluated: 32, effectively constant: 2