Skip to content

Soft modifier is treated as a modifier when it shouldn't #21923

Open
@hamzaremmal

Description

@hamzaremmal

Compiler version

d78516a

Minimized code

def m1(opaque: Any): Any = 
  opaque 
  
def m2() = ???

Output

-- [E103] Syntax Error:playground.scala:2:2 ---------------------------------------
2 |  opaque
  |  ^^^^^^
  |  Illegal start of statement: this modifier is not allowed here
  |
  | longer explanation available when compiling with `-explain`
1 error found

Expectation

Should compile and not considered a modifier

Note

Found during the Spree with @KacperFKorban and @kasiaMarek

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions