Skip to content

Fix failing neg/i16820 test on JDK < 15 #16976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions tests/neg/i16820.check
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
| method g in object Test must be called with () argument
|
| longer explanation available when compiling with `-explain`
-- Error: tests/neg/i16820.scala:8:14 ----------------------------------------------------------------------------------
8 | val x3 = "".formatted // error
| ^^^^^^^^^^^^
| missing arguments for method formatted in class String
-- Error: tests/neg/i16820.scala:9:40 ----------------------------------------------------------------------------------
9 | val x4 = java.nio.file.Paths.get(".").toRealPath // error
-- Error: tests/neg/i16820.scala:7:40 ----------------------------------------------------------------------------------
7 | val x3 = java.nio.file.Paths.get(".").toRealPath // error
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| missing arguments for method toRealPath in trait Path
-- Error: tests/neg/i16820.scala:13:14 ---------------------------------------------------------------------------------
13 |def test = Foo(3) // error
-- Error: tests/neg/i16820.scala:11:14 ---------------------------------------------------------------------------------
11 |def test = Foo(3) // error
| ^^^^^^
| missing arguments for method apply in object Foo
4 changes: 1 addition & 3 deletions tests/neg/i16820.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ object Test:

val x1 = f // error
val x2 = g // error

val x3 = "".formatted // error
val x4 = java.nio.file.Paths.get(".").toRealPath // error
val x3 = java.nio.file.Paths.get(".").toRealPath // error

// #14567
case class Foo(x: Int)(xs: String*)
Expand Down