Files
sdk/pkg/front_end/testcases/extensions/operators.dart.weak.expect
T
Johnni Winther 56f46b0659 Remove non-nullable experiment flag from front_end test cases.
This changes the CFE expectation test suites to use unsound null safety
as default to avoid passing --enable-experiments=no-non-nullable to opt
out old test folders.

This change removes most test folders from the 'strong' tester, since
this now only supports sound null safety, which requires all libraries
to be opted in. Instead, the 'weak' tester now runs all test folders.
Additionally the 'outline' tester is changed to use unsound null safety
so that it call be used on all test folders.

The 'fast_strong' tester is removed since it should just be run locally
and it can be run by passing an option to the other testers.

References to non-existing 'shaker' folder has been removed from
testing.json.


Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-02-18 12:29:18 +00:00

148 lines
7.6 KiB
Plaintext

library;
//
// Problems in library:
//
// pkg/front_end/testcases/extensions/operators.dart:125:3: Error: Explicit extension application cannot be used as an expression.
// Operators(c) == c;
// ^^^^^^^^^
//
// pkg/front_end/testcases/extensions/operators.dart:126:3: Error: Explicit extension application cannot be used as an expression.
// Operators(c) != c;
// ^^^^^^^^^
//
import self as self;
import "dart:core" as core;
class Complex extends core::Object /*hasConstConstructor*/ {
final field core::double* real;
final field core::double* imaginary;
const constructor •(core::double* real, core::double* imaginary) → self::Complex*
: self::Complex::real = real, self::Complex::imaginary = imaginary, super core::Object::•()
;
method add(self::Complex* other) → self::Complex* {
return new self::Complex::•(this.{self::Complex::real}.{core::double::+}(other.{self::Complex::real}), this.{self::Complex::imaginary}.{core::double::+}(other.{self::Complex::imaginary}));
}
method sub(self::Complex* other) → self::Complex* {
return new self::Complex::•(this.{self::Complex::real}.{core::double::-}(other.{self::Complex::real}), this.{self::Complex::imaginary}.{core::double::-}(other.{self::Complex::imaginary}));
}
method negate() → self::Complex* {
return new self::Complex::•(this.{self::Complex::real}.{core::double::unary-}(), this.{self::Complex::imaginary}.{core::double::unary-}());
}
get hashCode() → core::int*
return this.{self::Complex::real}.{core::num::hashCode}.{core::num::*}(13).{core::num::+}(this.{self::Complex::imaginary}.{core::num::hashCode}.{core::num::*}(19));
operator ==(core::Object* other) → core::bool* {
if(core::identical(this, other))
return true;
return other is self::Complex* && this.{self::Complex::real}.{core::num::==}(other{self::Complex*}.{self::Complex::real}) && this.{self::Complex::imaginary}.{core::num::==}(other{self::Complex*}.{self::Complex::imaginary});
}
method toString() → core::String*
return "Complex(${this.{self::Complex::real}},${this.{self::Complex::imaginary}})";
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 method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
}
extension Operators on self::Complex* {
operator + = self::Operators|+;
operator - = self::Operators|-;
operator unary- = self::Operators|unary-;
}
static method Operators|+(lowered final self::Complex* #this, self::Complex* other) → self::Complex*
return #this.{self::Complex::add}(other);
static method Operators|-(lowered final self::Complex* #this, self::Complex* other) → self::Complex*
return #this.{self::Complex::sub}(other);
static method Operators|unary-(lowered final self::Complex* #this) → self::Complex*
return #this.{self::Complex::negate}();
static method main() → dynamic {
self::implicit();
self::explicit();
}
static method implicit() → dynamic {
self::Complex* c_m2 = new self::Complex::•(-2.0, 2.0);
self::Complex* c_m1 = new self::Complex::•(-1.0, 1.0);
self::Complex* c0 = new self::Complex::•(0.0, 0.0);
self::Complex* c1 = new self::Complex::•(1.0, -1.0);
self::Complex* c2 = new self::Complex::•(2.0, -2.0);
self::expect(c_m2, self::Operators|+(c0, c_m2));
self::expect(c_m2, self::Operators|+(c_m2, c0));
self::expect(c_m2, self::Operators|+(c_m1, c_m1));
self::expect(c_m1, self::Operators|+(c0, c_m1));
self::expect(c_m1, self::Operators|+(c_m1, c0));
self::expect(c0, self::Operators|+(c_m2, c2));
self::expect(c0, self::Operators|+(c2, c_m2));
self::expect(c0, self::Operators|+(c_m1, c1));
self::expect(c0, self::Operators|+(c1, c_m1));
self::expect(c0, self::Operators|+(c0, c0));
self::expect(c1, self::Operators|+(c0, c1));
self::expect(c1, self::Operators|+(c1, c0));
self::expect(c2, self::Operators|+(c0, c2));
self::expect(c2, self::Operators|+(c2, c0));
self::expect(c2, self::Operators|+(c1, c1));
self::expect(c_m2, self::Operators|-(c0, c2));
self::expect(c2, self::Operators|-(c2, c0));
self::expect(c_m2, self::Operators|unary-(c2));
self::expect(c_m1, self::Operators|-(c1, c2));
self::expect(c1, self::Operators|-(c2, c1));
self::expect(c_m1, self::Operators|-(c0, c1));
self::expect(c1, self::Operators|-(c1, c0));
self::expect(c_m1, self::Operators|unary-(c1));
self::expect(c0, self::Operators|-(c2, c2));
self::expect(c0, self::Operators|-(c1, c1));
self::expect(c0, self::Operators|-(c0, c0));
self::expect(c0, self::Operators|-(c_m1, c_m1));
self::expect(c0, self::Operators|-(c_m2, c_m2));
self::expect(c0, self::Operators|unary-(c0));
}
static method explicit() → dynamic {
self::Complex* c_m2 = new self::Complex::•(-2.0, 2.0);
self::Complex* c_m1 = new self::Complex::•(-1.0, 1.0);
self::Complex* c0 = new self::Complex::•(0.0, 0.0);
self::Complex* c1 = new self::Complex::•(1.0, -1.0);
self::Complex* c2 = new self::Complex::•(2.0, -2.0);
self::expect(c_m2, self::Operators|+(c0, c_m2));
self::expect(c_m2, self::Operators|+(c_m2, c0));
self::expect(c_m2, self::Operators|+(c_m1, c_m1));
self::expect(c_m1, self::Operators|+(c0, c_m1));
self::expect(c_m1, self::Operators|+(c_m1, c0));
self::expect(c0, self::Operators|+(c_m2, c2));
self::expect(c0, self::Operators|+(c2, c_m2));
self::expect(c0, self::Operators|+(c_m1, c1));
self::expect(c0, self::Operators|+(c1, c_m1));
self::expect(c0, self::Operators|+(c0, c0));
self::expect(c1, self::Operators|+(c0, c1));
self::expect(c1, self::Operators|+(c1, c0));
self::expect(c2, self::Operators|+(c0, c2));
self::expect(c2, self::Operators|+(c2, c0));
self::expect(c2, self::Operators|+(c1, c1));
self::expect(c_m2, self::Operators|-(c0, c2));
self::expect(c2, self::Operators|-(c2, c0));
self::expect(c_m2, self::Operators|unary-(c2));
self::expect(c_m1, self::Operators|-(c1, c2));
self::expect(c1, self::Operators|-(c2, c1));
self::expect(c_m1, self::Operators|-(c0, c1));
self::expect(c1, self::Operators|-(c1, c0));
self::expect(c_m1, self::Operators|unary-(c1));
self::expect(c0, self::Operators|-(c2, c2));
self::expect(c0, self::Operators|-(c1, c1));
self::expect(c0, self::Operators|-(c0, c0));
self::expect(c0, self::Operators|-(c_m1, c_m1));
self::expect(c0, self::Operators|-(c_m2, c_m2));
self::expect(c0, self::Operators|unary-(c0));
}
static method errors(self::Complex* c) → void {
invalid-expression "pkg/front_end/testcases/extensions/operators.dart:125:3: Error: Explicit extension application cannot be used as an expression.
Operators(c) == c;
^^^^^^^^^".{core::Object::==}(c);
!invalid-expression "pkg/front_end/testcases/extensions/operators.dart:126:3: Error: Explicit extension application cannot be used as an expression.
Operators(c) != c;
^^^^^^^^^".{core::Object::==}(c);
}
static method expect(dynamic expected, dynamic actual) → dynamic {
if(!expected.{core::Object::==}(actual)) {
throw "Mismatch: expected=${expected}, actual=${actual}";
}
}