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
For a tracked class parameter we add a refinement in the constructor type that
the class member is the same as the parameter. E.g.
```scala
class C { type T }
class D(tracked val x: C) { type T = x.T }
```
This will generate the constructor type:
```scala
(x1: C): D { val x: x1.type }
```
Without `tracked` the refinement would not be added. This can solve several problems with dependent class
types where previously we lost track of type dependencies.
p => p.symbol.is(ParamAccessor) && (p.symbol.owner eq sym)
453
461
if illegalRefs.nonEmpty then
454
462
report.error(
455
463
em"The type of a class parent cannot refer to constructor parameters, but ${parent.tpe} refers to ${illegalRefs.map(_.name.show).mkString(",")}", parent.srcPos)
0 commit comments