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

Survive inaccessible types when computing implicit scope #21589

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 14, 2024

Also: Give a better error message later when encountering a missing type that refers to a private member of a base class. The previous one was misleading since it referred to a potentially missing class file, which is certainly not the case here.

Fixes #21543

Also: Give a better error message later when encountering a missing type that
refers to a private member of a base class. The previous one was misleading since
it referred to a potentially missing class file, which is certainly not the case here.

Fixes scala#21543
Comment on lines -3301 to +3302
|Java defined annotations don't have an exact constructor representation
|and we previously relied on the order of the fields to create one.
|Java defined annotations don't have an exact constructor representation
|and we previously relied on the order of the fields to create one.
Copy link
Member

@hamzaremmal hamzaremmal Sep 14, 2024

Choose a reason for hiding this comment

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

This PR will fail because of the changes here, some of the checkfiles will not match anymore, they need to be updated.

@hamzaremmal hamzaremmal assigned odersky and unassigned hamzaremmal Sep 14, 2024

new Scope {
val commands = List(
Cmd(List("1", "2"))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Cmd(List("1", "2"))
Cmd(List("1", "2")) // error // error

@odersky
Copy link
Contributor Author

odersky commented Sep 14, 2024

The trailing spaces were removed automatically in my commit since my editor removes them. To avoid that problem in the future, we should have a commit hook that tests that there are no trailing spaces or that removes them. We used to have something like this, as far as I recall.

@som-snytt
Copy link
Contributor

Since I was just re-reading the forum topic on multiline strings as Java "text blocks", which also strip trailing incidental white space, I will vote for that feature with my time.

Even with text blocks, it's useful to normalize trailing white space and also whether source code has a trailing newline, since the extraneous diff is a distraction.

@odersky odersky merged commit e1a4941 into scala:main Sep 14, 2024
28 checks passed
@odersky odersky deleted the fix-21543 branch September 14, 2024 17:49
@WojciechMazur WojciechMazur added this to the 3.6.0 milestone Oct 8, 2024
WojciechMazur added a commit that referenced this pull request Dec 4, 2024
…o LTS (#22128)

Backports #21589 to the 3.3.5.

PR submitted by the release tooling.
[skip ci]
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.

"assertion failed: NoType" with private type aliases inside a trait leaking
4 participants