Skip to content

don't consider imports when typing package declaration name#10111

Merged
SethTisue merged 1 commit intoscala:2.13.xfrom
lrytz:packageNameMode
Aug 18, 2022
Merged

don't consider imports when typing package declaration name#10111
SethTisue merged 1 commit intoscala:2.13.xfrom
lrytz:packageNameMode

Conversation

@lrytz
Copy link
Member

@lrytz lrytz commented Aug 18, 2022

Similar to Scala 3:

package a.x
class C { def inA = 0 }
package b
import a._
package x {
  class C { def inB = 0 }
}

Before this PR, the PackageDef.pid for b.x refers to the package symbol a.x.

I couldn't spot any uses of PackageDef.pid in the compiler, so it's probably benign.

@som-snytt
Copy link
Contributor

I guess you mean once Namer does the right thing structurally, no one uses pid.

I was just looking at package names last spring because of scala/bug#12566

You just said about something "we need a mode for that." But was it this?

Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good one.

@lrytz
Copy link
Member Author

lrytz commented Aug 18, 2022

I guess you mean once Namer does the right thing structurally, no one uses pid

Maybe I meant I could not find uses of the pid's symbol

You just said about something "we need a mode for that." But was it this?

I don't remember anything here :)

@lrytz lrytz marked this pull request as ready for review August 18, 2022 11:39
@SethTisue SethTisue modified the milestones: 2.13.10, 2.13.9 Aug 18, 2022
@som-snytt
Copy link
Contributor

maybe retronym said somewhere we need a mode for this. Thanks again.

@SethTisue SethTisue merged commit 3faf9a9 into scala:2.13.x Aug 18, 2022
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

Successfully merging this pull request may close these issues.

5 participants