Retire implicit shadower in favour of post-hoc analysis of typedImplicit#7757
Retire implicit shadower in favour of post-hoc analysis of typedImplicit#7757retronym wants to merge 2 commits intoscala:2.12.xfrom
Conversation
1192539 to
fb27e4d
Compare
fb27e4d to
7c2d2bd
Compare
7c2d2bd to
86ecd0a
Compare
6050707 to
593999b
Compare
| Some(collectImplicits(owner.thisType.implicitMembers, owner.thisType)) | ||
| } | ||
| } else if (scope != nextOuter.scope && !owner.isPackageClass) { | ||
| } else if (scope != nextOuter.scope && !owner.isPackageClass && !(owner.isClass && owner.isInitialized)) { |
There was a problem hiding this comment.
can we check whether this is local in one shot? Since isClass covers isPackageClass?
|
Let's see what the community build says, and if it looks good -- port to 2.13. Too late in the 2.12 cycle to tweak implicit search |
|
I'm investigating a failure in the community build: |
|
Minimized the regression to: The implicit |
593999b to
42403cf
Compare
|
I've pushed a fix that still reinstates a simpler form of shadowing checks into the search. Because of the improvements to |
…typedImplicit I'm not 100% sure about neg/t729.scala, which I've converted to a pos test. The original bug report is archived: https://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=729.html
Mark the input `Ident` with an attachment and search for that to find the corresponding tree in the type checked output. `itree2` does _not_ have macros expanded (even whitebox), that comes later in `itree3`. I added a test for such cases to be sure.
42403cf to
87aab31
Compare
|
@diesalbla It is still worthwhile. I realise now that simply re-using the I'm now also considering a different change (retronym#49) that doesn't change current semantics. I'll close this PR now and do my benchmarking over there :) |
The motivations are:
HashSetinLocalShadoweris an allocation hotspot)typedIdentandinferImplicit)