- 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 originitype:bug
Description
Compiler version
Capture Calculus branch, commit 952a829ae39700849bf4ad98d9b7b110d3f89a1a
.
Minimized code
class Session: def request = "Response" class Foo: private val session: {*} Session = new Session def withSession[T](f: ({*} Session) => T): T = f(session) @main def Test = val f = new Foo f.withSession(s => s).request
Output
Compiles successfully.
Expectation
Should fail. The following workaround fails as expected:
class Session: def request = "Response" type TrSession = {*} Session class Foo: private val session: TrSession = new Session def withSession[T](f: TrSession => T): T = f(session) @main def Test = val f = new Foo f.withSession(s => s).request // fail
Metadata
Metadata
Assignees
Labels
cc-experimentIntended to be merged with cc-experiment branch on originIntended to be merged with cc-experiment branch on originitype:bug