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
A problem arises if we typecheck an expression like `new C()` with expected type
`C[U]` where `C` is
defined like this
```scala
class C[X](using X)()
```
In this case, we'd like to propagate `U` as the type instance of `X` before we
resolve the using clause. To do this, we have to keep the expected result
type `C[X]` for typechecking the function part `new C`. Previously, that type was wrapped
in an IgnoredProto.
The problem was detected now since a class C with just the using clause and
no empty parameter clause was previously expanded to
```scala
class C[X]()(using X)
```
but is now expanded to
```scala
class C[X](using X)()
```
Under the previous expansion, we type checked and `new C()` before looking
for an argument of the using clause, so the problem did not arise.
0 commit comments