Skip to content

Don't ascribe type refinements in case of overrides with different modifier #474

Description

@wiwa

Given:

  trait AC {
    def foo: Int
  }
  def ac = new AC {
    override val foo: Int = 0
  }

Obtained:

  def ac: AC { val foo: Int } = new AC {
    override val foo: Int = 0
  }

Expected:

  def ac: AC = new AC {
    override val foo: Int = 0
  }

This happens when overriding a def with val. Should figure out how this works in the context of lazy vals as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions