Files
sdk/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
T
Peter von der Ahé 57ac8b1ad9 Remove redundant instrumentation from tests and expectations.
Remove instrumentation for diagnostic messages, forwarding stubs and
covariance, since all this information is present in the expectation
files already.

Change-Id: Idf6622f7eddba801761e13666b470ae6dcc9d59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97106
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-20 06:52:13 +00:00

50 lines
2.3 KiB
Plaintext

library;
//
// Problems in library:
//
// pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// i = s;
// ^
//
// pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
// Try changing the type of the left hand side, or casting the right hand side to 'int'.
// i ??= s;
// ^
//
// pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
// - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
// Try changing the type of the left hand side, or casting the right hand side to 'A'.
// a += 1;
// ^
//
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() → self::A
: super core::Object::•()
;
operator +(core::int i) → core::String
return "";
}
static method test(core::int i, core::String s, self::A a) → dynamic {
i = 1;
i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
i = s;
^" in s as{TypeError} core::int;
i.{core::num::==}(null) ?{core::int} i = 1 : null;
i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
Try changing the type of the left hand side, or casting the right hand side to 'int'.
i ??= s;
^" in s as{TypeError} core::int : null;
a = new self::A::•();
a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
- 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
Try changing the type of the left hand side, or casting the right hand side to 'A'.
a += 1;
^" in a.{self::A::+}(1) as{TypeError} self::A;
}
static method main() → dynamic {}