Skip to content

Commit

Permalink
changed-features/eta-expansion-spec.md : add expected type to example
Browse files Browse the repository at this point in the history
Current code produces compilation error: 
"missing argument list for method foo"
The example requires an expected type to compile
  • Loading branch information
unkarjedy authored Jul 29, 2024
1 parent 3c29355 commit 9abb230
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Methods with implicit parameter lists will always get applied to implicit argume
def foo(x: Int)(implicit p: Double): Float = ???
implicit val bla: Double = 1.0

val bar = foo // val bar: Int => Float = ...
val bar: Int => Float = foo // val bar: Int => Float = ...
```

## Automatic Eta-Expansion and context types
Expand Down

0 comments on commit 9abb230

Please sign in to comment.