Skip to content

Conversation

nox213
Copy link
Contributor

@nox213 nox213 commented Sep 5, 2025

closes #23577

@Gedochao Gedochao requested a review from sjrd September 8, 2025 13:18
val tree =
if (mt.isResultDependent) {
if (formals.length != defaultArity)
untpd.TypeTree()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the doc of the enclosing function, it seems we should return a wildcard type when a type is not known, hence:

Suggested change
untpd.TypeTree()
typeTree(WildcardType)

Copy link
Contributor Author

@nox213 nox213 Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

880fc84
Thank you for your review. Could you tell me where I can find the doc?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an i123577.check file to ensure that the displayed error is meaningful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nox213 nox213 requested a review from sjrd September 9, 2025 00:25
@sjrd
Copy link
Member

sjrd commented Sep 9, 2025

Looks good now. Would you mind squashing all the commits into one with a clean commit message? Right now that's a lot of messy commits for so few lines of code changes :p

rename test file

fix

fix test

address reviews
@nox213
Copy link
Contributor Author

nox213 commented Sep 10, 2025

Done!

@sjrd sjrd enabled auto-merge September 10, 2025 01:19
@nox213
Copy link
Contributor Author

nox213 commented Sep 10, 2025

-- Error: tests/pos-custom-args/captures/check-override-typebounds-2.scala:6:23 ----------------------------------------
6 |  type T <: Capbility^{caps.cap.rd}
  |                       ^^^^^^^^^^^
  |                       cap.rd cannot be tracked since its capture set is empty
  |
  |                       where:    cap is the universal root capability
-- Error: tests/pos-custom-args/captures/check-override-typebounds-2.scala:9:14 ----------------------------------------
9 |  type T = C^{caps.cap.rd}
  |              ^^^^^^^^^^^
  |              cap.rd cannot be tracked since its capture set is empty
  |
  |              where:    cap is the universal root capability
Compilation failed for: 'tests/pos-custom-args/captures/check-override-typebounds-2.scala'
Error:  Test dotty.tools.dotc.CompilationTests.pos failed: java.lang.AssertionError: Pos test failed, but should not, reasons:
Error:  encountered 1 test failure(s):
Error:    - generic failure (see test output), took 94.582 sec
Error:      at dotty.tools.vulpix.ParallelTesting$CompilationTest.checkPass(ParallelTesting.scala:1269)
Error:      at dotty.tools.vulpix.ParallelTesting$CompilationTest.checkCompile(ParallelTesting.scala:1185)
Error:      at dotty.tools.dotc.CompilationTests.pos(CompilationTests.scala:56)
Error:      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
Error:      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:      at java.lang.reflect.Method.invoke(Method.java:569)
Error:      ...

I don’t see why it failed. testCompilation passed on my machine, and it had also passed in the previous run.

auto-merge was automatically disabled September 10, 2025 04:41

Head branch was pushed to by a user without write access

@nox213 nox213 requested a review from sjrd September 12, 2025 00:13
@nox213
Copy link
Contributor Author

nox213 commented Sep 12, 2025

Is this good to merge? auto-merge wasn't triggered because of failure(it passed after rerun)

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.

Compiler crash in presence of SAM + dependent types + mismatched signature
2 participants