Skip to content

REPL doesn't do leading dot of float #12563

Closed as not planned
Closed as not planned
@som-snytt

Description

@som-snytt

Reproduction steps

Welcome to Scala 2.13.8 (OpenJDK 64-Bit Server VM, Java 17.0.2).
Type in expressions for evaluation. Or try :help.

scala> 42
val res0: Int = 42

scala> .42
           ^
       error: ';' expected but double literal found.

scala> def f = .42
def f: Double

scala> "hi"
val res1: String = hi

scala> .length
val res2: Int = 2

Problem

Pity the beginner trying out forms of literals in the REPL. Or me.

Also the caret does not align. It's probably prompt-indented? It's a fixed offset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)repl

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions