Skip to content

Leading infix operator not recognized before colon at EOL #12218

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

Closed
odersky opened this issue Apr 26, 2021 · 0 comments · Fixed by #12219
Closed

Leading infix operator not recognized before colon at EOL #12218

odersky opened this issue Apr 26, 2021 · 0 comments · Fixed by #12219
Milestone

Comments

@odersky
Copy link
Contributor

odersky commented Apr 26, 2021

As reported on contributors:

import language.experimental.fewerBraces
@main def runTest(): Unit =
  val arr = Array(1,2,3)
  if
    arr.isEmpty
    || :
      val first = arr(0)
      first != 1
  then println("invalid arr")
  else println("valid arr")

Expected: should compile

Actual:

-- [E006] Not Found Error: test.scala:6:4 --------------------------------------
6 |    || :
  |    ^^
  |    Not found: ||
odersky added a commit to dotty-staging/dotty that referenced this issue Apr 26, 2021
michelou pushed a commit to michelou/scala3 that referenced this issue Apr 27, 2021
@Kordyjan Kordyjan added this to the 3.0.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants