Skip to content

Commit 8d522ae

Browse files
oderskymichelou
authored andcommitted
Fix comparison of dependent function types
Dependent function types are expressed as refinements over regular function types. These refinements need to be compared with the standard arrow rule for function subtyping. But comparison of method refinements so far demanded equal parameter types. The solution is tricky since refined types lead to selections via reflection still cannot tolerate differing parameter types since reflexive method dispatch uses precise parameter types. That's why we apply standard arrow rule only for refinements where the refined method exists in the underlying class. Fixes scala#12211
1 parent 5ab7165 commit 8d522ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dotty.tools
1+
sdpackage dotty.tools
22
package dotc
33
package core
44

0 commit comments

Comments
 (0)