Skip to content
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

Zinc undercompile in case of construct like A.type#B#C when type behind C changes #476

Closed
romanowski opened this issue Jan 6, 2018 · 1 comment

Comments

@romanowski
Copy link
Contributor

romanowski commented Jan 6, 2018

Problem

When we have situation when e.g. object defines type:

// Providers.scala
trait Provider { type Operations = A } // trait A { def a = 1 } and trait B { def a = 1 } defined somewhere
object Providers { type SomeProvider = Provider }

In another place this type is used and e.g. return type

// Foo.scala
object Foo { def provide: Providers.type#SomeProvider#Operations = ??? }

and lastly it is those method is called:

// Bar.scala
object Bar { Foo.provide.a }

When we change type Operations = A to type Operations = BandFoo.provide.atoFoo.provide.b` and incremental compile we would get compilation error:

[error] Bar.scala:1:26: value b is not a member of A
[error] object Bar { Foo.provide.b }

When we e.g. add space (or any other way force compilation) in Foo.scala all compiles fine.

PR with tests for it is here #475

@Friendseeker
Copy link
Member

Fixed by #1284

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

4 participants