- Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
cc-experimentIntended to be merged with cc-experiment branch on originIntended to be merged with cc-experiment branch on origin
Description
Compiler version
Head of cc-experiment.
Minimized code
Capture sets of function arguments can "vanish", for some reason. Naturally, they shouldn't do that.
scala> class Session // defined class Session scala> def withSession[T](thunk : ({*} Session) => T): T = thunk(new Session) def withSession[T](thunk: ({*} Session) => T): T scala> withSession(t => t) val res1: Session = Session@7866a0b3
The type of res1 should've been {*} Session
.
We also don't reject:
scala> def foo(s : Session): Unit = () def foo(s: Session): Unit scala> withSession(foo)
/cc @odersky
Metadata
Metadata
Assignees
Labels
cc-experimentIntended to be merged with cc-experiment branch on originIntended to be merged with cc-experiment branch on origin