Skip to content

Inline as a soft keyword #5145

Closed
Closed
@allanrenucci

Description

@allanrenucci

You can currently define a variable whose name is inline, but you can't reference it

class Test {
  def foo(x: Int): Int = {
    val inline = 3
    inline
  }
}
-- [E103] Syntax Error: tests/allan/Test.scala:4:4 -----------------------------
4 |    inline
  |    ^^^^^^
  |    Illegal start of statement: no modifiers allowed here

longer explanation available when compiling with `-explain`

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions