Skip to content

Dependent FTs example from docs doesn't compile #5794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
biboudis opened this issue Jan 25, 2019 · 0 comments
Closed

Dependent FTs example from docs doesn't compile #5794

biboudis opened this issue Jan 25, 2019 · 0 comments

Comments

@biboudis
Copy link
Contributor

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
@biboudis biboudis self-assigned this Jan 25, 2019
biboudis added a commit to dotty-staging/dotty that referenced this issue Jan 25, 2019
@biboudis biboudis changed the title Dependent Function Types example from docs doesn't compile Dependent fun types example from docs doesn't compile Jan 25, 2019
@biboudis biboudis changed the title Dependent fun types example from docs doesn't compile Dependent FTs example from docs doesn't compile Jan 25, 2019
smarter added a commit that referenced this issue Jan 26, 2019
Fix #5794: eta-expansion triggered properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant