Skip to content

val 1 = 2 and other value declarations that don't declare any values confuse the REPL #4950

@scabug

Description

@scabug
Welcome to Scala version 2.9.1.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26).
Type in expressions to have them evaluated.
Type :help for more information.

scala> { val 1 = 2 }
scala.MatchError: 2 (of class java.lang.Integer)

scala> val 1 = 2

the latter should be an error too

#4939 was closed as wontfix, but this is just the REPL piece of it, which really is a bug

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions