blob: 337c65641c52a604d9dc488c4789cc3031f09e89 [file] [log] [blame]
library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
import "package:expect/expect.dart";
static const field core::int var1 = #C1;
static const field core::int var3 = #C2;
static method varAssignmentTest(core::int a) core::int {
core::int x = 4;
{
x = 3;
}
return x;
}
static method function() core::int {
function varAssignmentTest2() core::int {
core::int x = 2;
x = x.{core::num::+}(1);
return x;
}
return #C1;
}
static method varAssignmentTest3(core::int a) core::int {
core::int x = 4;
x = a.{core::num::+}(1);
return x;
}
static method main() void {
exp::Expect::equals(#C1, 3);
exp::Expect::equals(self::function(), 3);
exp::Expect::equals(#C2, 2);
}
constants {
#C1 = 3
#C2 = 2
}