blob: bdddcdb6810ebdd971de9cbd890a96343f1faa22 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
class C<T extends core::Object> extends core::Object {
field dynamic v = MakeClosure<(dynamic) core::bool>(self::closure#C#v#function, null);
final field dynamic y = MakeClosure<() core::String>(self::closure#C#y#function, null);
static final field dynamic z = MakeClosure<() core::String>(self::closure#C#z#function, null);
constructor •() void
: super core::Object::•()
;
}
static field dynamic x = MakeClosure<() core::String>(self::closure#x#function, null);
static method main() dynamic {
if(!new self::C::•<core::String>().v(""))
throw "C<String>.v false on String";
if(new self::C::•<core::String>().v(0))
throw "C<String>.v true on int";
if(new self::C::•<core::String>().v(null))
throw "C<String>.v true on null";
if(new self::C::•<core::int>().v(""))
throw "C<int>.v true on String";
if(!new self::C::•<core::int>().v(0))
throw "C<int>.v false on int";
if(new self::C::•<core::int>().v(null))
throw "C<int>.v true on null";
if(!"x".==(self::x.call()))
throw "x";
if(!"y".==(new self::C::•<core::String>().y()))
throw "y";
if(!"z".==(self::C::z.call()))
throw "z";
}
static method closure#C#v#function(Vector #contextParameter, dynamic x) → core::bool {
return x is dynamic;
}
static method closure#C#y#function(Vector #contextParameter) → core::String {
return "y";
}
static method closure#C#z#function(Vector #contextParameter) → core::String {
return "z";
}
static method closure#x#function(Vector #contextParameter) → core::String {
return "x";
}