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
scalac inference/other/BaseClass.scala inference/Derived.scala
inference/Derived.scala:3:error: constructor BaseClass in classBaseClass cannot be accessed in packageinferenceAccess to protected constructor BaseClass not permitted because
enclosing packageinferenceisnotasubclassofclassBaseClass in packageotherwheretargetisdefinedclassDerivedextends other.BaseClass("value")
^
inference/Derived.scala:3:error: no arguments allowed for nullary constructor Object: ()ObjectclassDerivedextends other.BaseClass("value")
^
two errors found
If classes in the same package, everything is fine. If type parameter is specified extends other.BaseClass[String]("value") everything is also fine.
The text was updated successfully, but these errors were encountered:
cat inference/other/BaseClass.scala
:cat inference/Derived.scala
Compile:
If classes in the same package, everything is fine. If type parameter is specified
extends other.BaseClass[String]("value")
everything is also fine.The text was updated successfully, but these errors were encountered: