blob: e2269a8f18993bbd307493968d215b26e9bff6e1 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: '+' is not a prefix operator.
// Try removing '+'.
// const int unaryPlus = +2;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
// const int divZero = 2 / 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:5:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:5:30: Context: Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative1 = 2 << -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:5:11: Context: While analyzing:
// const int shiftNegative1 = 2 << -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Error: Constant evaluation error:
// const int shiftNegative2 = 2 >>> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Context: Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative2 = 2 >>> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:11: Context: While analyzing:
// const int shiftNegative2 = 2 >>> -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:7:30: Error: Constant evaluation error:
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:7:30: Context: Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.
// const int shiftNegative3 = 2 >> -1;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:7:11: Context: While analyzing:
// const int shiftNegative3 = 2 >> -1;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:8:23: Error: Constant evaluation error:
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:8:23: Context: Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int modZero = 2 % 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:8:11: Context: While analyzing:
// const int modZero = 2 % 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:10:26: Error: Constant evaluation error:
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:10:26: Context: Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.
// const int intdivZero = 2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:10:11: Context: While analyzing:
// const int intdivZero = 2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Error: Constant evaluation error:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:40: Context: Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:37:11: Context: While analyzing:
// const int doubleTruncateDivZero = 84.2 ~/ 0;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Error: Constant evaluation error:
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:40: Context: Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:39:11: Context: While analyzing:
// const int doubleTruncateDivNull = 84.2 ~/ nil;
// ^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:41:39: Error: Constant evaluation error:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:41:39: Context: Binary operator '84.2 ~/ NaN' results is Infinity or NaN.
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:41:11: Context: While analyzing:
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
import self as self;
import "dart:core" as core;
static const field core::int shiftNegative1 = invalid-expression "Binary operator '<<' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative2 = invalid-expression "Binary operator '>>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int shiftNegative3 = invalid-expression "Binary operator '>>' on '2.0' requires non-negative operand, but was '-1.0'.";
static const field core::int modZero = invalid-expression "Binary operator '%' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int divZero = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
const int divZero = 2 / 0;
^";
static const field core::int intdivZero = invalid-expression "Binary operator '~/' on '2.0' requires non-zero divisor, but divisor was '0'.";
static const field core::int unaryMinus = #C1;
static const field core::int unaryTilde = #C2;
static const field core::int unaryPlus = invalid-expression "pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: This couldn't be parsed.
const int unaryPlus = +2;
^";
static const field core::int binaryPlus = #C3;
static const field core::int binaryMinus = #C3;
static const field core::int binaryTimes = #C3;
static const field core::double binaryDiv = #C3;
static const field core::int binaryTildeDiv = #C3;
static const field core::int binaryMod = #C3;
static const field core::int binaryOr = #C3;
static const field core::int binaryAnd = #C3;
static const field core::int binaryXor = #C3;
static const field core::int binaryShift1 = #C3;
static const field core::int binaryShift2 = #C3;
static const field core::int binaryShift3 = #C4;
static const field core::int binaryShift4 = #C3;
static const field core::int binaryShift5 = #C5;
static const field core::bool binaryLess = #C6;
static const field core::bool binaryLessEqual = #C7;
static const field core::bool binaryGreaterEqual = #C7;
static const field core::bool binaryGreater = #C6;
static const field core::int doubleTruncateDiv = #C3;
static const field core::int doubleTruncateDivZero = invalid-expression "Binary operator '~/' on '84.2' requires non-zero divisor, but divisor was '0'.";
static const field dynamic nil = #C8;
static const field core::int doubleTruncateDivNull = invalid-expression "Binary operator '~/' on '84.2' requires operand of type 'num', but was of type 'Null'.";
static const field core::double doubleNan = #C9;
static const field core::int doubleTruncateDivNaN = invalid-expression "Binary operator '84.2 ~/ NaN' results is Infinity or NaN.";
static const field core::int bigNumber = #C10;
static method main() dynamic {}
constants {
#C1 = -2.0
#C2 = 4294967293.0
#C3 = 42.0
#C4 = 0.0
#C5 = 4294967295.0
#C6 = false
#C7 = true
#C8 = null
#C9 = NaN
#C10 = 9223372036854776000.0
}