Inferred Contextual params are less nameable#24381
Conversation
There was a problem hiding this comment.
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.
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.