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
The aim of the refactoring is to be clearer and to be able to drop ExtMethodApply.
Two main strategies:
1. Move some code out of adapt and assignType into typedSelect.
2. Concentrate extension method expansion and conversions for selections in a
method `tryExtensionOrConversion. The method is called from `typedSelect`
and `tryInsertImplicitOnQualifier`.
The aim of the refactoring is to move all select-dependent adaptations and re-tries into
typedSelect. Right now some are in adapt and some are in assignType. This is awkward
since it means that
- we do too much in TypeAssigner. Sine it aims to be minimal TypeAssigner should have no business doing adaptations
and retries.
- we do some adaptations too early in adpt. This means we need the kludge of wrapping
trees in ExtMethodApply which causes #8182, among others.
Fixes#8182
if isOldStyleFunctionConversion(ref.underlying) &&!tree.isInstanceOf[Applications.ExtMethodApply] =>
807
-
report.migrationWarning(
808
-
i"The conversion ${ref} will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.",
809
-
from
810
-
)
806
+
caseSearchSuccess(_, ref, _, false) if isOldStyleFunctionConversion(ref.underlying) =>
807
+
report.migrationWarning(
808
+
i"The conversion ${ref} will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views.",
0 commit comments