Skip to content

Dependent FTs example from docs doesn't compile #5794

Closed
@biboudis

Description

@biboudis

The following example taken from docs failed to type check:

  trait Entry { type Key; val key: Key }
  def extractKey(e: Entry): e.Key = e.key
  val extractor: (e: Entry) => e.Key = extractKey

with error:

33 |  val extractor: (e: Entry) => e.Key = extractKey
   |                                       ^^^^^^^^^^
   |                                 missing arguments for method extractKey

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions