You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- [E007] TypeMismatchError:try/inew.scala:17:13----------------------------17| bar1(h1, a1) // error|^^|Found: (a1 : h1.A)
|Required: h.A|Note that implicit conversions were not tried because the result of an implicit conversion
|must be more specific than h.A|----------------------------------------------------------------------------|Explanation (enabled by `-explain`)
|--------------------------------------||Tree: a1
|I tried to show that
| (a1 : h1.A)
| conforms to
| h.A| but none of the attempts shown below succeeded:
||==> (a1 : h1.A) <: h.A|==> (a1 : h1.A) <:T|==> h1.A<:T|==> h1.T<:T|==> (h1 : HasA[?]) <: (HasA.this:HasA[T])
|==>HasA[?] <: (HasA.this:HasA[T]) =false|==>Any<:T=false||The tests were made under the empty constraint
------------------------------------------------------------------------------ [E007] TypeMismatchError:try/inew.scala:20:13----------------------------20| bar2(h1, a1) // error|^^|Found: (a1 : h1.A)
|Required: h1².A||where: h1 is a parameter in method foo3
| h1² is a reference to a value parameter
||Note that implicit conversions were not tried because the result of an implicit conversion
|must be more specific than h1.A|----------------------------------------------------------------------------|Explanation (enabled by `-explain`)
|--------------------------------------||Tree: a1
|I tried to show that
| (a1 : h1.A)
| conforms to
| h1.A| but none of the attempts shown below succeeded:
||==> (a1 : h1.A) <: h1.A|==> (a1 : h1.A) <:T|==> h1.A<:T|==> h1.T<:T|==> (h1 : HasA[?]) <: (HasA.this:HasA[T])
|==>HasA[?] <: (HasA.this:HasA[T]) =false|==>Any<:T=false||The tests were made under the empty constraint
----------------------------------------------------------------------------
Expectation
No error, like in 3.7.0 and previous versions. The errors go away if I turn off the changes from #22839 :
diff --git compiler/src/dotty/tools/dotc/core/Types.scala compiler/src/dotty/tools/dotc/core/Types.scala
index c2c508dc27..971225bc28 100644
--- compiler/src/dotty/tools/dotc/core/Types.scala+++ compiler/src/dotty/tools/dotc/core/Types.scala@@ -3822,7 +3822,7 @@ object Types extends TypeUtils {
def integrate(tparams: List[ParamInfo], tp: Type)(using Context): Type =
(tparams: @unchecked) match {
case LambdaParam(lam, _) :: _ => tp.subst(lam, this) // This is where the precondition is necessary.
- case params: List[Symbol @unchecked] => IntegrateMap(params, paramRefs)(tp)+ case params: List[Symbol @unchecked] => tp.subst(params, paramRefs)
}
/** A map that replaces references to symbols in `params` by the types in
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Compiler version
Regression started with #22839 present in 3.7.1-RC1.
Minimized code
Output
Expectation
No error, like in 3.7.0 and previous versions. The errors go away if I turn off the changes from #22839 :
The text was updated successfully, but these errors were encountered: