Skip to content

Commit

Permalink
Enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed May 6, 2022
1 parent 358ced2 commit f06137e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
23 changes: 23 additions & 0 deletions tests/neg-with-compiler/unused-imports.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- [E007] Type Mismatch Error: tests/neg-with-compiler/unused-imports.scala:11:15 --------------------------------------
11 | def i: Int = "42" // error sanity check
| ^^^^
| Found: ("42" : String)
| Required: Int
|
| longer explanation available when compiling with `-explain`
-- Error: tests/neg-with-compiler/unused-imports.scala:5:16 ------------------------------------------------------------
5 |import language.postfixOps // error
| ^^^^^^^^^^
| Unused import
-- Error: tests/neg-with-compiler/unused-imports.scala:6:24 ------------------------------------------------------------
6 |import scala.concurrent.* // error
| ^
| Unused import
-- Error: tests/neg-with-compiler/unused-imports.scala:12:43 -----------------------------------------------------------
12 | import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} // error // error
| ^^^^^^^^^^^^^^^^^^
| Unused import
-- Error: tests/neg-with-compiler/unused-imports.scala:12:77 -----------------------------------------------------------
12 | import scala.collection.mutable.{HashMap as GoodMap, Seq as _, ListBuffer, Buffer, Set as OK} // error // error
| ^^^^^^
| Unused import
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// skalac: -Wunused:imports -Werror -feature
// disabled because doesn't work under scala3-bootstrapped/test
// works under testCompilation
// scalac: -Wunused:imports -Werror -feature

//import language.future
import language.implicitConversions
import language.postfixOps //?error
import scala.concurrent.* //?error
import language.postfixOps // error
import scala.concurrent.* // error
import scala.concurrent.ExecutionContext.Implicits.*

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

def buf = ListBuffer.empty[String]
def ok: OK[Int] = ???
Expand Down
7 changes: 0 additions & 7 deletions tests/neg/unused-imports.check

This file was deleted.

0 comments on commit f06137e

Please sign in to comment.