-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inferred Contextual params are less nameable #24381
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
base: main
Are you sure you want to change the base?
Inferred Contextual params are less nameable #24381
Conversation
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.
The approach looks workable to me. The test failures seem to come from this part in Message.scala:
override def ParamRefNameString(param: ParamRef): String =
seen.record(super.ParamRefNameString(param), param.isInstanceOf[TypeParamRef], param)Maybe we can try to just turn off seen.record here, i.e. drop the whole def? I am not sure more explanations of parameter names help. But one has to try it out and look at the changes.
73533af to
dab9edb
Compare
|
Just a stop-gap update. I will revisit the parameter disambiguation. Now it is aware that the written |
|
I think @Sporarum's comment on the issue makes sense. |
| protected def ParamRefNameString(param: ParamRef): String = | ||
| ParamRefNameString(param.binder.paramNames(param.paramNum)) | ||
| val name = param.binder.paramNames(param.paramNum) | ||
| ParamRefNameString: |
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.
Answering @Sporarum's comment on the issue :
#24375 (comment)
Maybe we should work on the toString function for ContectFunctionParamNames instead of intervening here.
e0a5939 to
cbc28fc
Compare
|
The There are other failing tests on recent JDKs because of the way lambdas are printed, etc. |
cbc28fc to
88af888
Compare
|
Pushed the same "fix" downstack, but I haven't given any thought to what is desirable in a superscript, or whether other kinds would benefit from similar tweaking. |
Fixes #24375
The original name can be recovered for messages.