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

Fix expandParam's use of argForParam/isArgPrefixOf. #19412

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

dwijnand
Copy link
Member

Fixes #19354

@dwijnand dwijnand marked this pull request as ready for review January 10, 2024 22:35
@dwijnand dwijnand requested a review from smarter January 10, 2024 22:35
@@ -6276,7 +6276,7 @@ object Types extends TypeUtils {
*/
def expandParam(tp: NamedType, pre: Type): Type =
tp.argForParam(pre) match {
case arg @ TypeRef(pre, _) if pre.isArgPrefixOf(arg.symbol) =>
case arg @ TypeRef(`pre`, _) if pre.isArgPrefixOf(arg.symbol) =>
Copy link
Member

Choose a reason for hiding this comment

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

Hah, we really need a shadowing warning for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, probably. Obviously it's worst when the types match up exactly, but I've definitely shadowed things intentionally, ala port.parse.match { case Some(port) => ... }, so hard to find the right ergonomics...

@smarter smarter merged commit fa448fb into scala:main Jan 10, 2024
19 checks passed
@dwijnand dwijnand deleted the stream-overload branch January 11, 2024 10:20
@Kordyjan Kordyjan added this to the 3.3.2 milestone Jan 15, 2024
@Kordyjan Kordyjan added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Jan 15, 2024
@Kordyjan Kordyjan added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Jan 17, 2024
Kordyjan added a commit that referenced this pull request Jan 19, 2024
@Kordyjan Kordyjan added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Jan 19, 2024
Kordyjan added a commit that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported.
Projects
None yet
3 participants