blob: 3f357cace58b78887b92ad2c38ee6f192270c12e [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
class A extends core::Object {
synthetic constructor •() void
: 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<BottomType> _ = null in let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
i = /*@error=InvalidAssignment*/ s;
^" in let final core::String #t2 = s in null;
i.{core::num::==}(null) ?{core::int} i = 1 : null;
i.{core::num::==}(null) ?{core::Object} i = let<BottomType> _ = null in let final dynamic #t3 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
i ??= /*@error=InvalidAssignment*/ s;
^" in let final core::String #t4 = s in null : null;
a = new self::A::•();
a = let<BottomType> _ = null in let final dynamic #t5 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'dart.core::String' can't be assigned to a variable of type '#lib1::A'.
Try changing the type of the left hand side, or casting the right hand side to '#lib1::A'.
a /*@error=InvalidAssignment*/ += 1;
^" in let final core::String #t6 = a.{self::A::+}(1) in null;
}
static method main() → dynamic {}