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

Add optional seenfromClass to ThisTypeSubstitution #663

Open
wants to merge 2 commits into
base: idea242.x
Choose a base branch
from

Conversation

dwijnand
Copy link
Contributor

@dwijnand dwijnand commented Aug 5, 2024

Pass in the context class of the member whose type is being substituted
(analagous to the seenFromClass passed to scalac's asSeenFrom). Use
this to guide the walk through enclosing classes.

Also, fix basetypes handling around ScThisType

Fixes SCL-21585
Fixes SCL-21947

Pass in the context class of the member whose type is being substituted
(analagous to the `seenFromClass` passed to scalac's asSeenFrom). Use
this to guide the walk through enclosing classes.

Also, fix basetypes handling around ScThisType
@dwijnand dwijnand marked this pull request as ready for review August 5, 2024 17:19
@sugakandrey sugakandrey self-assigned this Aug 12, 2024
@sugakandrey
Copy link
Contributor

@dwijnand Thanks for the PR! I'll look into it in the next couple of days.

@dwijnand
Copy link
Contributor Author

dwijnand commented Sep 2, 2024

@sugakandrey any thoughts?

@sugakandrey
Copy link
Contributor

@dwijnand I am sorry for the delay, I have not forgotten about this PR, despite how it might look. :)
I just had a quick look, seems very reasonable to me. I'll run your branch through our CI tomorrow and hopefully get it merged.

@lrytz
Copy link

lrytz commented Sep 3, 2024

For the record, I built the plugin with this change and tested it on scala/scala. It fixes the issue I reported (https://youtrack.jetbrains.com/issue/SCL-21947).

@sugakandrey
Copy link
Contributor

@dwijnand
This is looking pretty good, only a couple of test failures, namely:

org.jetbrains.plugins.scala.projectHighlighting.scalaCompilerTestdata.ScalaCompilerTestdataHighlightingTest_2_12.testScalacTests
org.jetbrains.plugins.scala.lang.typeInference.generated.TypeInferencePatternTest.testDependent
org.jetbrains.plugins.scala.projectHighlighting.downloaded.MeerkatProjectHighlightingTest.testHighlighting
org.jetbrains.plugins.scala.lang.adjustTypes.tests.AdjustTypesTests.testRecursiveTypeAlias

I can try fixing them after I'm done with the stuff I'm working on right now or you can have a stab at it.

@dwijnand
Copy link
Contributor Author

dwijnand commented Sep 4, 2024

I can try fixing them after I'm done with the stuff I'm working on right now or you can have a stab at it.

I'm in a similar place. I'll ping when I reproduce those failures.

@dwijnand
Copy link
Contributor Author

dwijnand commented Sep 9, 2024

OK, I have the failures locally (can't remember if all of those failed) and I have a fix in the works.

@dwijnand
Copy link
Contributor Author

@sugakandrey Could you give it another run? I found the fixes for testScalacTests, testDependent, and testRecursiveTypeAlias. But I minimised testHighlighting down to it passing and then back up to a minimised failure, and fix it, but hadn't realised that - for some reason - it doesn't pass locally for me even without my changes (I think!). So if you could rerun the tests, I can reassess from there.

@sugakandrey
Copy link
Contributor

@dwijnand I'll give it a spin tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants