8000 Use the nearest in-scope ancestor · Issue #416 · twitter/rsc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use the nearest in-scope ancestor #416

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

Open
wiwa opened this issue Apr 4, 2019 · 1 comment
Open

Use the nearest in-scope ancestor #416

wiwa opened this issue Apr 4, 2019 · 1 comment
Labels

Comments

@wiwa
Copy link
Contributor
wiwa commented Apr 4, 2019
package foo

class A

object B {
  def default: B = new B
}
private[foo] class B extends A
package bar

val x = B.default

In this case, we might consider ascribing type A to x since B is private[foo]. On the other hand, we can also warn or error.

@wiwa wiwa added the Scalafix label Apr 4, 2019
@wiwa
Copy link
Contributor Author
wiwa commented Apr 9, 2019

Note: this is unlikely to have high return on investment for the kind targets we've run RscCompat on (apparently this is rare-ish).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant
0