Files
sdk/pkg/front_end/testcases/inference/infer_binary_custom.dart.strong.expect
T
Daniel Hillerström 98a9adf696 Make constructor function types conform with the specification.
Prior to this CL the return type of any constructor function was
always void. According to the specification §9.3 the return type of a
constructor function ought to be its enclosing class.

Change-Id: I70d76cc354b7f118ce96bf4954daf7fe535eb7be
Reviewed-on: https://dart-review.googlesource.com/76160
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-26 09:39:11 +00:00

20 lines
510 B
Plaintext

library test;
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
;
operator +(dynamic other) → core::int
return 1;
operator -(dynamic other) → core::double
return 2.0;
}
static field core::int v_add = new self::A::•().{self::A::+}("foo");
static field core::double v_minus = new self::A::•().{self::A::-}("bar");
static method main() → dynamic {
self::v_add;
self::v_minus;
}