Skip to content

Commit 0858612

Browse files
committed
Add regression test
1 parent fc04bcd commit 0858612

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

compiler/test/dotc/run-test-pickling.blacklist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ tuple-zip.scala
2222
tuples1.scala
2323
tuples1a.scala
2424
tuples1b.scala
25+
typeCheckErrors.scala
2526
typeclass-derivation-doc-example.scala
2627
typeclass-derivation1.scala
2728
typeclass-derivation2.scala

tests/run/typeCheckErrors.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
List(Error(value check is not a member of Unit,compileError("1" * 2).check(""),22,Typer), Error(argument to compileError must be a statically known String,compileError("1" * 2).check(""),13,Typer))

tests/run/typeCheckErrors.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import scala.compiletime.testing._
2+
3+
transparent inline def compileError(inline expr: String): Unit =
4+
println(typeCheckErrors(expr))
5+
6+
@main def Test = compileError(
7+
"""compileError("1" * 2).check("")"""
8+
)

0 commit comments

Comments
 (0)