Skip to content

Private types can be inferred but not explicitly typed #10366

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

Closed
ShaneDelmore opened this issue Jun 13, 2017 · 7 comments
Closed

Private types can be inferred but not explicitly typed #10366

ShaneDelmore opened this issue Jun 13, 2017 · 7 comments

Comments

@ShaneDelmore
Copy link

ShaneDelmore commented Jun 13, 2017

Two examples:
https://scastie.scala-lang.org/wdskxrQQRbeB2ZHkDdXaoA

And

package factory{
  private [factory] class Factory
  object Factory{
    def f(): factory.Factory = new Factory()
  }
}
object G {
 //type annotation fails to compile!
  val f: factory.Factory = factory.Factory.f()
}
@paulp
Copy link

paulp commented Jul 19, 2017

I've opened many other tickets about this. It will not be fixed.

@SethTisue
Copy link
Member

Duplicate of #6794

@SethTisue SethTisue marked this as a duplicate of #6794 Jul 19, 2017
@ShaneDelmore
Copy link
Author

@paulp Open and marked critical for 5 years now. It may take me another 5 years to reconcile those facts. The well linked history was entertaining at least.

@SethTisue
Copy link
Member

on the subject of "marked critical": scala/scala-dev#406

@ShaneDelmore
Copy link
Author

@SethTisue Makes sense, thanks.

@som-snytt
Copy link

@ShaneDelmore As of today, your 1-year clock is ticking on "It may take me another 5 years to reconcile those facts."

Duplicative of #1800

@joroKr21
Copy link
Member

I think #6794 has the most catchy title

@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants