Skip to content

Improve REPL display #10024

Closed
scala/scala
#8319
@scabug

Description

@scabug

The current REPL output for definitions is very confusing because it is almost, but not quite valid Scala and also inconsistent.

Some examples:

scala> case class Foo()
defined class Foo
scala> trait Bar
defined trait Bar
scala> type Qux = Nothing
defined type alias Qux
scala> val a = 1
a: Int = 1
scala> var b = 1
b: Int = 1

The Scala REPL's response should be more consistent reporting about definitions.
Possible solutions

  • no output in the success case (as does the Python REPL)
  • display the type definition (as it is currently the case but without "defined" )
  • display the type definition as valid Scala
  • ...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions