c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
91 lines
4.8 KiB
Plaintext
91 lines
4.8 KiB
Plaintext
library;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/regress/issue_32972.dart:22:3: Error: 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: Error: 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: Error: 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> {}
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/regress/issue_32972.dart:27:5: Error: Expected 1 type arguments.
|
|
// f.bar<double, double>(42.42);
|
|
// ^
|
|
//
|
|
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);
|
|
}
|
|
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
|
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
|
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
|
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
|
|
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
|
|
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
|
|
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
|
|
abstract member-signature method toString() → core::String*; -> core::Object::toString
|
|
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
|
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
|
|
}
|
|
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::•()
|
|
;
|
|
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode
|
|
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
|
|
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
|
|
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
|
|
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
|
|
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::==
|
|
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode
|
|
abstract member-signature method toString() → core::String*; -> core::Object::toString
|
|
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
|
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
|
|
}
|
|
static method foo<X extends core::Object* = dynamic>(self::foo::X* i) → void {
|
|
core::print(i);
|
|
}
|
|
static method main() → dynamic {
|
|
invalid-expression "pkg/front_end/testcases/regress/issue_32972.dart:22:3: Error: Expected 1 type arguments.
|
|
foo<String, String>(\"hello world\");
|
|
^";
|
|
self::foo<core::String*>("hello world");
|
|
invalid-expression "pkg/front_end/testcases/regress/issue_32972.dart:24:7: Error: Expected 1 type arguments.
|
|
Foo.foo<int, int>(42);
|
|
^";
|
|
self::Foo::foo<core::int*>(42);
|
|
self::Foo* f = new self::Foo::•();
|
|
let final Never* #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_32972.dart:27:5: Error: Expected 1 type arguments.
|
|
f.bar<double, double>(42.42);
|
|
^" in f.{self::Foo::bar}<core::double*, core::double*>(42.42);
|
|
f.{self::Foo::bar}<core::double*>(42.42);
|
|
invalid-expression "pkg/front_end/testcases/regress/issue_32972.dart:29:7: Error: Expected 2 type arguments.
|
|
new Bar<String>();
|
|
^";
|
|
new self::Bar::•<core::String*, core::String*>();
|
|
}
|