Skip to content

Capture sets of function arguments vanish #15057

@abgruszecki

Description

@abgruszecki

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

No one assigned

    Labels

    cc-experimentIntended to be merged with cc-experiment branch on origin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions