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
-- Error: as.scala:8:12 --------------------------------------------------------
8 | new Values(())
| ^^^^^^
| Object.this.Values is not a class type
-- Error: as.scala:8:19 --------------------------------------------------------
8 | new Values(())
| ^^
| too many arguments for constructor Object in class Object: (): Object
2 errors found
Expectation
It should compile. It compiles with Scala 2.12 and 2.13.
The text was updated successfully, but these errors were encountered:
As a workaround you can explicitly pass the type argument.
newD2[Int](1) // works
The problem is that at the time we typecheck the new we do not have the inferred type. And just looking at D2 it's not true that this is an alias of C2. Hence the failure.
Compiler version
3.0.0-RC1
Minimized code
Output
Expectation
It should compile. It compiles with Scala 2.12 and 2.13.
The text was updated successfully, but these errors were encountered: