Skip to content

Various literals allowed in postfix position on expr #5824

Closed
@bishabosha

Description

@bishabosha

tested in Dotty REPL 0.12-RC1, I believe only these cases are an issue:

val foo = <expr> <booleanLiteral
                  | characterLiteral
                  | stringLiteral
                  | symbolLiteral
                  | "null">

e.g.

val foo = 123 'bar;

in Dotty REPL results in val foo: Int = 123, this is particularly bad as the Symbol literal is ignored, where otherwise an error is generated for their presence.

However, in Scala REPL 2.12.8 results in:

<console>:1: error: ';' expected but symbol literal found.
       val foo = 123 'bar;
                     ^

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