Skip to content

Commit 52ad606

Browse files
committed
Trying to fix test ome more
It works locally, not sure why the CI fails?
1 parent 63f03df commit 52ad606

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

docs/docs/reference/changed-features/numeric-literals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ With the setup of the previous section, a literal like
174174
```
175175
would be expanded by the compiler to
176176
```scala
177-
BigFloat.FromDigits.fromDigits("1e10_0000_000_000")
177+
BigFloat.FromDigits.fromDigits("1e100000000000")
178178
```
179179
Evaluating this expression throws a `NumberTooLarge` exception at run time. We would like it to
180180
produce a compile-time error instead. We can achieve this by tweaking the `BigFloat` class
181181
with a small dose of meta-programming. The idea is to turn the `fromDigits` method
182-
of the into a macro, i.e. make it an inline method with a splice as right hand side.
182+
into a macro, i.e. make it an inline method with a splice as right hand side.
183183
To do this, replace the `FromDigits` instance in the `BigFloat` object by the following two definitions:
184184
```scala
185185
object BigFloat {

tests/neg/BigFloat/BigFloat_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package test
12
import scala.util.FromDigits
23
import scala.quoted._
34
import scala.quoted.matching._

tests/neg/BigFloat/Test_2.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import scala.util.FromDigits
1+
import test.BigFloat
22
object Test extends App {
33
val x: BigFloat = 1234.45e3333333333 // error: exponent too large
44
}

tests/run/BigFloat/BigFloat_1.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package test
12
import scala.util.FromDigits
23
import scala.quoted._
34
import scala.quoted.matching._

tests/run/BigFloat/Test_2.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import test.BigFloat
12
import scala.util.FromDigits
23
object Test extends App {
34

0 commit comments

Comments
 (0)