Skip to content

Commit ffa01df

Browse files
committed
fix error in test
1 parent 1009b9a commit ffa01df

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

tests/neg/i11118.check

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
-- Warning: tests/neg/i11118.scala:2:12 --------------------------------------------------------------------------------
2-
2 |val (a,b) = (1,2,3) // error // warning
1+
-- Error: tests/neg/i11118.scala:2:12 ----------------------------------------------------------------------------------
2+
2 |val (a,b) = (1,2,3) // error
33
| ^^^^^^^
44
| pattern's type (Any, Any) does not match the right hand side expression's type (Int, Int, Int)
55
|
66
| If the narrowing is intentional, this can be communicated by adding `: @unchecked` after the expression,
77
| which may result in a MatchError at runtime.
88
| This patch can be rewritten automatically under -rewrite -source 3.2-migration.
9-
-- Error: tests/neg/i11118.scala:2:4 -----------------------------------------------------------------------------------
10-
2 |val (a,b) = (1,2,3) // error // warning
11-
| ^
12-
| this case is unreachable since type (Int, Int, Int) is not a subclass of class Tuple2

tests/neg/i11118.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// https://github.com/lampepfl/dotty/issues/11118
2-
val (a,b) = (1,2,3) // error // warning
2+
val (a,b) = (1,2,3) // error

0 commit comments

Comments
 (0)