You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: jscomp/build_tests/super_errors/expected/math_operator_constant.res.expected
+2-8
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,8 @@
7
7
[1;31m3[0m [2m│[0m let x = num + [1;31m12.[0m
8
8
4 [2m│[0m
9
9
10
-
This value has type: [1;31mfloat[0m
11
-
But it's being used with the [1;33m+[0m operator, which works on: [1;33mint[0m
12
-
13
-
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
14
-
15
-
Possible solutions:
16
-
- Ensure all values in this calculation has the type [1;33mint[0m. You can convert between floats and ints via [1;33mBelt.Float.toInt[0m and [1;33mBelt.Int.fromFloat[0m.
17
-
- Make [1;33m12.[0m an [1;33mint[0m by removing the dot or explicitly converting to int
10
+
This has type: [1;31mfloat[0m
11
+
But it's expected to have type: [1;33mint[0m
18
12
19
13
You can convert [1;33mfloat[0m to [1;33mint[0m with [1;33mBelt.Float.toInt[0m.
20
14
If this is a literal, try a number without a trailing dot (e.g. [1;33m20[0m).
But it's being used with the [1;33m+[0m operator, which works on: [1;33mint[0m
12
-
13
-
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
14
-
15
-
Possible solutions:
16
-
- Ensure all values in this calculation has the type [1;33mint[0m. You can convert between floats and ints via [1;33mBelt.Float.toInt[0m and [1;33mBelt.Int.fromFloat[0m.
17
-
- Change the operator to [1;33m+.[0m, which works on [1;33mfloat[0m
18
-
19
-
You can convert [1;33mfloat[0m to [1;33mint[0m with [1;33mBelt.Float.toInt[0m.
20
-
If this is a literal, try a number without a trailing dot (e.g. [1;33m20[0m).
But it's being used with the [1;33m+[0m operator, which works on: [1;33mint[0m
11
-
12
-
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
13
-
14
-
Possible solutions:
15
-
- Ensure all values in this calculation has the type [1;33mint[0m. You can convert between floats and ints via [1;33mBelt.Float.toInt[0m and [1;33mBelt.Int.fromFloat[0m.
16
-
- Make [1;33m2.[0m an [1;33mint[0m by removing the dot or explicitly converting to int
9
+
This has type: [1;31mint[0m
10
+
But it's expected to have type: [1;33mfloat[0m
17
11
18
-
You can convert [1;33mfloat[0m to [1;33mint[0m with [1;33mBelt.Float.toInt[0m.
19
-
If this is a literal, try a number without a trailing dot (e.g. [1;33m20[0m).
12
+
You can convert [1;33mint[0m to [1;33mfloat[0m with [1;33mBelt.Int.toFloat[0m.
13
+
If this is a literal, try a number with a trailing dot (e.g. [1;33m20.[0m).
But it's being used with the [1;33m+[0m operator, which works on: [1;33mint[0m
10
-
11
-
Floats and ints have their own mathematical operators. This means you cannot add a float and an int without converting between the two.
12
-
13
-
Possible solutions:
14
-
- Ensure all values in this calculation has the type [1;33mint[0m. You can convert between floats and ints via [1;33mBelt.Float.toInt[0m and [1;33mBelt.Int.fromFloat[0m.
15
-
- Make [1;33m2.[0m an [1;33mint[0m by removing the dot or explicitly converting to int
8
+
This has type: [1;31mint[0m
9
+
But it's expected to have type: [1;33mfloat[0m
16
10
17
-
You can convert [1;33mfloat[0m to [1;33mint[0m with [1;33mBelt.Float.toInt[0m.
18
-
If this is a literal, try a number without a trailing dot (e.g. [1;33m20[0m).
11
+
You can convert [1;33mint[0m to [1;33mfloat[0m with [1;33mBelt.Int.toFloat[0m.
12
+
If this is a literal, try a number with a trailing dot (e.g. [1;33m20.[0m).
0 commit comments