-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Regression on path dependent types from 3.2 #21536
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
Comments
I guess this relates to #16804 but the answer there is not satisfactory, since dropping the path-dependent-types from this (and its down the line) project seriously hampers its type safety. What is the workaround? Can this be expressed via implicits somehow since they are unique (the cause identified in @soronpo his issue)? |
cc @jchyb |
Hi @AnnelineD. Looking at the linked project, it looks to me like it should be enough to just drop the inline modifier from the object PatchG:
inline def apply[EL, MG <: DNIELMG[EL]](mg: MG)(inline ptps: List[(mg.Node | C.type, mg.Node | C.type)]): PatchG[EL, MG] This will make the |
@Gedochao I'm looking again on the original issue, and it seems that people run into it several more times and spent time to minimize it. I think we should change the problem to a reporting issue. The compiler needs to suggest to remove the |
@soronpo Agreed. Can you re-raise this as a reporting issue? linking back to #21536 and #16804. |
Closing this, the reporting improvement should be tracked under #21538 |
Compiler version
Works on 3.2.2 and fails on 3.3.2 and 3.5.0.
Minimized code
https://github.com/Adam-Vandervorst/LLGraph/blob/10f010e536beb1c8fb5f5a8bf80f7c308dc72768/src/main/scala/be.adamv.llgraph/graphs/PatchG.scala#L112
Output
Expectation
To compile, since the inlined version does type-check.
Example usage:
https://github.com/Adam-Vandervorst/LLGraph/blob/10f010e536beb1c8fb5f5a8bf80f7c308dc72768/src/test/scala/PatchGTest.scala#L24
The text was updated successfully, but these errors were encountered: