Skip to content

Commit 7a68165

Browse files
committed
Fix tests and add check files
1 parent 8b80c3d commit 7a68165

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ class TreePickler(pickler: TastyPickler) {
699699
case ex: AssertionError =>
700700
println(i"error when pickling tree $tree")
701701
throw ex
702-
case ex: MatchError =>
702+
case ex: MatchError =>
703703
println(i"error when pickling tree $tree")
704704
throw ex
705705
}

tests/neg/i12448.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Main {
22
def mkArray[T <: A]: T#AType // error // error
3-
mkArray[Array] // was: "assertion failed: invalid prefix HKTypeLambda..."
4-
val x = mkArray[Array]
3+
mkArray[Array] // was: "assertion failed: invalid prefix HKTypeLambda..." // error
4+
val x = mkArray[Array] // error
55
}

tests/neg/i16842.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Error: tests/neg/i16842.scala:24:7 ----------------------------------------------------------------------------------
2+
24 | Liter(SemanticArray[SemanticInt.type], x) // error
3+
| ^
4+
| invalid new prefix (dim: Int): SemanticArray[SemanticInt.type] cannot replace ty.type in type ty.T

tests/neg/i16842.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ def typecheckArrayLiter(
2121
a: ArrayLiter
2222
): Liter[SemanticArray[SemanticType]] = {
2323
val x: List[Expr2[SemanticInt.type]] = List()
24-
Liter(SemanticArray[SemanticInt.type], x) // error // error
24+
Liter(SemanticArray[SemanticInt.type], x) // error
2525
}

tests/neg/i18058.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Error: tests/neg/i18058.scala:4:21 ----------------------------------------------------------------------------------
2+
4 |type G = (f: _ <: F) => f.A // error
3+
| ^
4+
| invalid new prefix <: F cannot replace f.type in type f.A

0 commit comments

Comments
 (0)