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

Aggressive "inline must be followed by an if or a match" error in Scala 2 #7066

Open
sjrd opened this issue Dec 25, 2024 · 0 comments
Open
Labels
upstream-fix-needed Waiting on a fix upstream

Comments

@sjrd
Copy link

sjrd commented Dec 25, 2024

Describe the bug

Define a method called inline in Scala 2 code, then call it:

def inline(foo: Int): Int = foo

def bar(x: Int): Int =
  inline(x)

The call to inline is flagged as a compile error with

`inline` must be followed by an `if` or a `match`

even though Scala 2 accepts this code.

This worked before. It was apparently broken by v1.4.2.

Expected behavior

No compile error in the IDE.

Operating system

Windows

Editor/Extension

VS Code

Version of Metals

v1.45.0

Extra context or search terms

No response

@tgodzik tgodzik added the upstream-fix-needed Waiting on a fix upstream label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-fix-needed Waiting on a fix upstream
Projects
Status: Triage
Development

No branches or pull requests

2 participants