-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It was accidentally put back on the info arg list. Insult to injury, its "-" arg was no longer parsed.
- Loading branch information
Showing
6 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Compiler arguments written to: print-args-run.obj/print-args.txt | ||
newSource1.scala:3: error: type mismatch; | ||
found : String("42") | ||
required: Int | ||
def f: Int = "42" | ||
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
import java.nio.file.Files | ||
|
||
import scala.jdk.CollectionConverters._ | ||
import scala.reflect.internal.util._ | ||
import scala.tools.partest.DirectTest | ||
|
||
object Test extends DirectTest { | ||
lazy val argfile = testOutput.jfile.toPath().resolve("print-args.txt") | ||
override def extraSettings = s"${super.extraSettings} -Xsource:3 -Vprint-args ${argfile}" | ||
def expected = | ||
sm""" | ||
|-usejavacp | ||
|-d | ||
|${testOutput.jfile.toPath()} | ||
|-Xsource:3.0.0 | ||
|-Vprint-args | ||
|${testOutput.jfile.toPath().resolve(argfile)} | ||
|newSource1.scala | ||
""" | ||
def code = | ||
sm""" | ||
|class C { | ||
| def f: Int = "42" | ||
|} | ||
""" | ||
def show() = { | ||
assert(!compile()) | ||
assert(expected.linesIterator.toList.tail.init.sameElements(Files.readAllLines(argfile).asScala)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters