Index: pkg/kernel/testcases/strong-mode/covariant_generic.baseline.txt |
diff --git a/pkg/kernel/testcases/strong-mode/covariant_generic.baseline.txt b/pkg/kernel/testcases/strong-mode/covariant_generic.baseline.txt |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9b0d0d789526e5812bf37fccccfe0bbcbe3e6b20 |
--- /dev/null |
+++ b/pkg/kernel/testcases/strong-mode/covariant_generic.baseline.txt |
@@ -0,0 +1,44 @@ |
+library; |
+import self as self; |
+import "dart:core" as core; |
+ |
+class Foo<T extends core::Object> extends core::Object { |
+ final field self::Foo::T finalField; |
+ final field (self::Foo::T) → void callbackField; |
+ field self::Foo::T mutableField = null; |
+ field (self::Foo::T) → void mutableCallbackField = null; |
+ constructor •(self::Foo::T finalField, (self::Foo::T) → void callbackField) → void |
+ : self::Foo::finalField = finalField, self::Foo::callbackField = callbackField, super core::Object::•() |
+ ; |
+ method method(self::Foo::T x) → void {} |
+ set setter(self::Foo::T x) → void {} |
+ method withCallback((self::Foo::T) → void callback) → void { |
+ callback.call(this.{self::Foo::finalField}); |
+ } |
+ set /* from null */ mutableField$cc(core::Object mutableField_) → dynamic |
+ this.{=self::Foo::mutableField} = mutableField_ as self::Foo::T; |
+ method method$cc(core::Object x) → void |
+ this.{=self::Foo::method}(x as self::Foo::T); |
+ set setter$cc(core::Object x) → void |
+ this.{=self::Foo::setter} = x as self::Foo::T; |
+} |
+static method main() → dynamic { |
+ self::Foo<core::int> fooInt = new self::Foo::•<core::int>(1, (core::int x) → void {}); |
+ fooInt.{self::Foo::method}(3); |
+ fooInt.{self::Foo::setter} = 3; |
+ fooInt.{self::Foo::withCallback}((core::int x) → void {}); |
+ fooInt.{self::Foo::withCallback}((core::num x) → void {}); |
+ fooInt.{self::Foo::mutableField} = 3; |
+ fooInt.{self::Foo::mutableCallbackField} = (core::int x) → void {}; |
+ self::Foo<core::num> fooNum = fooInt; |
+ fooNum.{self::Foo::method$cc}(3); |
+ fooNum.{self::Foo::method$cc}(2.5); |
+ fooNum.{self::Foo::setter$cc} = 3; |
+ fooNum.{self::Foo::setter$cc} = 2.5; |
+ fooNum.{self::Foo::withCallback}((core::num x) → void {}); |
+ fooNum.{self::Foo::mutableField$cc} = 3; |
+ fooNum.{self::Foo::mutableField$cc} = 2.5; |
+ fooNum.{self::Foo::mutableCallbackField}.call(3); |
+ fooNum.{self::Foo::mutableCallbackField}.call(2.5); |
+ fooNum.{self::Foo::mutableCallbackField} = (core::num x) → void {}; |
+} |