Skip to content

Commit f06137e

Browse files
committed
Enable test
1 parent 358ced2 commit f06137e

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- [E007] Type Mismatch Error: tests/neg-with-compiler/unused-imports.scala:11:15 --------------------------------------
2+
11 | def i: Int = "42" // error sanity check
3+
| ^^^^
4+
| Found: ("42" : String)
5+
| Required: Int
6+
|
7+
| longer explanation available when compiling with `-explain`
8+
-- Error: tests/neg-with-compiler/unused-imports.scala:5:16 ------------------------------------------------------------
9+
5 |import language.postfixOps // error
10+
| ^^^^^^^^^^
11+
| Unused import
12+
-- Error: tests/neg-with-compiler/unused-imports.scala:6:24 ------------------------------------------------------------
13+
6 |import scala.concurrent.* // error
14+
| ^
15+
| Unused import
16+
-- Error: tests/neg-with-compiler/unused-imports.scala:12:43 -----------------------------------------------------------
17+
12 | import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} // error // error
18+
| ^^^^^^^^^^^^^^^^^^
19+
| Unused import
20+
-- Error: tests/neg-with-compiler/unused-imports.scala:12:77 -----------------------------------------------------------
21+
12 | import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} // error // error
22+
| ^^^^^^
23+
| Unused import

tests/neg/unused-imports.scala renamed to tests/neg-with-compiler/unused-imports.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
// skalac: -Wunused:imports -Werror -feature
2-
// disabled because doesn't work under scala3-bootstrapped/test
3-
// works under testCompilation
1+
// scalac: -Wunused:imports -Werror -feature
42

53
//import language.future
64
import language.implicitConversions
7-
import language.postfixOps //?error
8-
import scala.concurrent.* //?error
5+
import language.postfixOps // error
6+
import scala.concurrent.* // error
97
import scala.concurrent.ExecutionContext.Implicits.*
108

119
class C:
1210
def c = 42
1311
def i: Int = "42" // error sanity check
14-
import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} //?error //?error
12+
import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} // error // error
1513

1614
def buf = ListBuffer.empty[String]
1715
def ok: OK[Int] = ???

tests/neg/unused-imports.check

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)