Skip to content
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

Nightly Dotty workflow of 2023-02-20 failed #16969

Closed
github-actions bot opened this issue Feb 20, 2023 · 4 comments · Fixed by #16976
Closed

Nightly Dotty workflow of 2023-02-20 failed #16969

github-actions bot opened this issue Feb 20, 2023 · 4 comments · Fixed by #16976

Comments

@github-actions
Copy link
Contributor

See https://github.com/lampepfl/dotty/actions/runs/4219642346

@WojciechMazur
Copy link
Contributor

The build fails in test neg/i16820, the offending line is:

  val x3 = "".formatted // error

Expected error:

val x3 = "".formatted // error
           ^^^^^^^^^^^^
           missing arguments for method formatted in class String

@WojciechMazur
Copy link
Contributor

WojciechMazur commented Feb 20, 2023

@Kordyjan Is it possible that's some issue related to the usage of merge queue? The failing tests were merged yesterday from pr #16892

Both of the failing CI runs were skipped in the CI on the pull request

@odersky Can you take a look at these failures? We might require to either fix the failures or re-evaluate should that case actually fail

@Kordyjan
Copy link
Contributor

We run those jobs only on tags and nightly builds, so it is expected that they were skipped.

@smarter
Copy link
Member

smarter commented Feb 20, 2023

The test should be changed to not call formatted on String. The problem is that this method is defined as an extension method in Scala, but it has been added as an instance method of String in Java 15 with a different behavior, see scala/bug#12471. This is why only test_java8 and test_windows_full fail, other jobs use a newer jdk.

smarter added a commit that referenced this issue Feb 20, 2023
Fixes #16969 

`String.formatted` is a method added in JDK 15. In Scala, we also define
the extension methods with the same name. Because of that the code in
the snippet failed in unexpected manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants