Chain of two `given...with` fail to fetch dependent type
See original GitHub issueChain of two given..with
dependencies fail to fetch dependent type. If IntCandidate
in the example below uses transparent inline given
then there is no error.
Compiler version
v3.1.0-RC2
Minimized code
scastie: https://scastie.scala-lang.org/k7wmGYQOQtCteA4IrDmJ7g
trait IntWidth {type Out}
given IntWidth with {type Out = 155}
trait IntCandidate {type Out}
given (using w: IntWidth): IntCandidate with {type Out = w.Out}
val x = summon[IntCandidate]
val xx = summon[x.Out =:= 155]
Output
Cannot prove that x.Out =:= (155 : Int).
Expectation
No error.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Using Apollo Link to Handle Dependent Queries
Given the example above, the user's profile screen needs to run two queries. One to get the user's information and their planet's ID:...
Read more >using a fetch inside another fetch in javascript - Stack Overflow
Fetch returns a promise, and you can chain multiple promises, and use the result of the 1st request in the 2nd request, and...
Read more >Promises chaining - The Modern JavaScript Tutorial
This feature allows us to integrate custom objects with promise chains without having to inherit from Promise . Bigger example: fetch. In ...
Read more >Chain HTTP Requests in React Using Promises - Pluralsight
You can easily complete this feature by using the Fetch and Promise APIs. The below code is an example of how you might...
Read more >Troubleshooting errors in AWS Glue
Error : Job run failed because the role passed should be given assume role permissions ... For more information, see Step 2: Create...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That sounds scary. I think it should remain opt-in.
But the underlying problem of dependent class constructors is definitely worth attacking!
Note: the Aux pattern works here scastie: aux pattern