-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
When the explicit nulls feature was added, we added special logic in overriding checks to allow existing overriding pairs between Java-defined and Scala-defined classes. For example, if a Java method has a String parameter, it should be allowed to be overridden by a Scala method with a String parameter, but explicit nulls would interpret the Java String parameter as String|Null and would forbid the overriding in the absence of such special logic.
Now that Java types are interpreted using flexible types, that special overriding logic is no longer needed and should be removed.
Here are some areas affected by the logic:
- The
RelaxedOverridingModeshould be removed entirely. relaxedOverrideContextinContextis no longer needed and should be removed.def matchesin classTypeuses the above. Adjust.- The
relaxedCheckparameter indef overridesin classTypeshould be removed. isOverridingPaircallsdef overrides. Adjust.
cc @noti0na1