From ffa01df787d73786e1f268a21ac4db9cb7436f14 Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Thu, 28 Sep 2023 13:37:52 +0200 Subject: [PATCH] fix error in test --- tests/neg/i11118.check | 8 ++------ tests/neg/i11118.scala | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/neg/i11118.check b/tests/neg/i11118.check index 0af98c7f580a..c62acbbfd4fb 100644 --- a/tests/neg/i11118.check +++ b/tests/neg/i11118.check @@ -1,12 +1,8 @@ --- Warning: tests/neg/i11118.scala:2:12 -------------------------------------------------------------------------------- -2 |val (a,b) = (1,2,3) // error // warning +-- Error: tests/neg/i11118.scala:2:12 ---------------------------------------------------------------------------------- +2 |val (a,b) = (1,2,3) // error | ^^^^^^^ | pattern's type (Any, Any) does not match the right hand side expression's type (Int, Int, Int) | | If the narrowing is intentional, this can be communicated by adding `: @unchecked` after the expression, | which may result in a MatchError at runtime. | This patch can be rewritten automatically under -rewrite -source 3.2-migration. --- Error: tests/neg/i11118.scala:2:4 ----------------------------------------------------------------------------------- -2 |val (a,b) = (1,2,3) // error // warning - | ^ - | this case is unreachable since type (Int, Int, Int) is not a subclass of class Tuple2 diff --git a/tests/neg/i11118.scala b/tests/neg/i11118.scala index 23d9b2b604b6..cdf03069e2b2 100644 --- a/tests/neg/i11118.scala +++ b/tests/neg/i11118.scala @@ -1,2 +1,2 @@ // https://github.com/lampepfl/dotty/issues/11118 -val (a,b) = (1,2,3) // error // warning +val (a,b) = (1,2,3) // error