Skip to content

Error says none for overloaded symbol #22671

@som-snytt

Description

@som-snytt

Compiler version

3.6.3

Minimized code

object X:
  def x: Int = 42
  def x(y: Int): Int = x + y

def test =
  X.x = 27

Output

  snips scala-cli compile --server=false -S 3.6.3 badass.scala
-- [E052] Type Error: /home/amarki/snips/badass.scala:7:6 ----------------------
7 |  X.x = 27
  |  ^^^^^^^^
  |  Reassignment to val <none>
  |
  | longer explanation available when compiling with `-explain`
1 error found
Compilation failed

Expectation

Tell me the name of the unassignable overload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    better-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesitype:bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions