-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15390 from dotty-staging/fix-15331
Fix dependency status calculation for refined type aliases in method result types
- Loading branch information
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
object Test: | ||
trait Composable[A,B]: | ||
def compose(a: A, b: B): Any | ||
|
||
trait Arrow {type Dom; type Codom} | ||
|
||
given composeArrows[A, Arr1 <: Arrow, Arr2 <: Arrow]: Composable[Arr1 {type Dom = A}, Arr2 {type Codom = A}] with | ||
def compose(a: Arr1 {type Dom = A}, b: Arr2 {type Codom = A}): Arrow {type Dom = b.Dom; type Codom = a.Codom} = ??? | ||
|
||
object arr1 extends Arrow { type Dom = Int; type Codom = Int} | ||
object arr2 extends Arrow {type Dom = Int; type Codom = Float} | ||
|
||
// removing "transparent" alleviates the situation | ||
inline transparent def compose[A, B](a: A, b: B)(using c: Composable[A,B]) = c.compose(a,b) | ||
val c = compose(arr2,arr1) |