| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/regress/issue_32972.dart:22:3: Warning: Expected 1 type arguments. |
| // foo<String, String>("hello world"); |
| // ^ |
| // pkg/front_end/testcases/regress/issue_32972.dart:5:6: Context: Found this candidate, but the arguments don't match. |
| // void foo<X>(X i) { |
| // ^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_32972.dart:24:7: Warning: Expected 1 type arguments. |
| // Foo.foo<int, int>(42); |
| // ^ |
| // pkg/front_end/testcases/regress/issue_32972.dart:10:10: Context: Found this candidate, but the arguments don't match. |
| // static foo<X>(X i) { |
| // ^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_32972.dart:29:7: Warning: Expected 2 type arguments. |
| // new Bar<String>(); |
| // ^ |
| // pkg/front_end/testcases/regress/issue_32972.dart:19:7: Context: The class 'Bar' has a constructor that takes no arguments. |
| // class Bar<X, Y> {} |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| |
| class Foo extends core::Object { |
| synthetic constructor •() → self::Foo* |
| : super core::Object::•() |
| ; |
| static method foo<X extends core::Object* = dynamic>(self::Foo::foo::X* i) → dynamic { |
| core::print(i); |
| } |
| method bar<X extends core::Object* = dynamic>(self::Foo::bar::X* i) → dynamic { |
| core::print(i); |
| } |
| } |
| class Bar<X extends core::Object* = dynamic, Y extends core::Object* = dynamic> extends core::Object { |
| synthetic constructor •() → self::Bar<self::Bar::X*, self::Bar::Y*>* |
| : super core::Object::•() |
| ; |
| } |
| static method foo<X extends core::Object* = dynamic>(self::foo::X* i) → void { |
| core::print(i); |
| } |
| static method main() → dynamic { |
| throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C1, 32, core::List::unmodifiable<dynamic>(<core::Type*>[core::String*, core::String*]), core::List::unmodifiable<dynamic>(<dynamic>["hello world"]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))); |
| self::foo<core::String*>("hello world"); |
| throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C1, 32, core::List::unmodifiable<dynamic>(<core::Type*>[core::int*, core::int*]), core::List::unmodifiable<dynamic>(<dynamic>[42]), core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))); |
| self::Foo::foo<core::int*>(42); |
| self::Foo* f = new self::Foo::•(); |
| f.bar<core::double*, core::double*>(42.42); |
| f.bar<core::double*>(42.42); |
| throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#C4, 32, core::List::unmodifiable<dynamic>(<core::Type*>[core::String*]), #C2, core::Map::unmodifiable<core::Symbol*, dynamic>(#C3))); |
| new self::Bar::•<core::String*, core::String*>(); |
| } |
| |
| constants { |
| #C1 = #foo |
| #C2 = <dynamic>[] |
| #C3 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C2} |
| #C4 = # |
| } |