blob: 6f715a0271a8a692649aa496d8e2d0e0c8d63176 [file] [log] [blame]
library test;
import self as self;
import "dart:core" as core;
static field core::int x = 0;
static field core::int y = 0;
static final field core::int z = 42;
static method test1() dynamic {
core::int a = self::x;
a = let<BottomType> _ = null in let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart:12: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'.
a = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in let final core::String #t2 = "hi" in null;
a = 3;
core::int b = self::y;
b = let<BottomType> _ = null in let final dynamic #t3 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart:15: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'.
b = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in let final core::String #t4 = "hi" in null;
b = 4;
core::int c = self::z;
c = let<BottomType> _ = null in let final dynamic #t5 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart:18: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'.
c = /*error:INVALID_ASSIGNMENT*/ \"hi\";
^" in let final core::String #t6 = "hi" in null;
c = 4;
}
static method main() → dynamic {}