Skip to content

val 1 = 0 in the REPL should MatchError (SI-4939 redux) #10214

Closed
@SethTisue

Description

@SethTisue

Scala 2 behavior is correct, as per scala/bug#4939

scala 2.13.3> val 1 = 0
scala.MatchError: 0 (of class java.lang.Integer)

but in Scala 3.0.0-M1:

scala> val 1 = 0

scala>                                                                                                                  

gitter today:

Michael Pilquist @mpilquist 12:21
out of curiosity, why does val 1 = 0 not throw a match error or otherwise fail in dotty repl?

Guillaume Martres @smarter 12:22
that's definitely a bug
the exception must be caught and ignored somewhere

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions