-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
@@ -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) => |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
Backports #19412 to 3.3.2 LTS.
Fixes #19354