@@ -38,8 +38,6 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
3838final def forArgMode (fun :Tree ,mode :Mode )=
3939if (treeInfo.isSelfOrSuperConstrCall(fun)) mode| SCCmode else mode
4040
41- def isScala3cross = currentRun.isScala3&& settings.source.value> scala.tools.nsc.settings.SpecificScalaVersion (3 ,0 ,0 , scala.tools.nsc.settings.Final )
42-
4341final val shortenImports = false
4442
4543// All typechecked RHS of ValDefs for right-associative operator desugaring
@@ -1129,7 +1127,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
11291127def adaptApplyInsertion (): Tree = {
11301128val msg = s " The method `apply` is inserted. The auto insertion will be deprecated, please write ` ${tree.symbol.name}.apply` explicitly. "
11311129 context.deprecationWarning(tree.pos, tree.symbol, msg," 2.13.13" )
1132- typed(Select (tree, nme.apply), mode, pt)
1130+ typed(atPos(tree.pos)( Select (tree, nme.apply) ), mode, pt)
11331131 }
11341132
11351133def adaptExprNotFunMode (): Tree = {
@@ -1138,7 +1136,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
11381136if (settings.isDebug&& settings.explaintypes.value) explainTypes(tree.tpe, pt)
11391137if (err nenull ) context.issue(err)
11401138if (tree.tpe.isErroneous|| pt.isErroneous) setError(tree)
1141- else if (isScala3cross && isFunctionType(pt)&& tree.symbol.isModule&& tree.symbol.companion.isCase)
1139+ else if (currentRun.isScala3Cross && isFunctionType(pt)&& tree.symbol.isModule&& tree.symbol.companion.isCase)
11421140 adaptApplyInsertion()
11431141else adaptMismatchedSkolems()
11441142 }
@@ -5373,12 +5371,14 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
53735371else context.javaFindMember(cls.typeOfThis, name, s=> s.isStaticMember|| s.isStaticModule)._2
53745372
53755373// If they try C.tupled, make it (C.apply _).tupled
5376- def fixUpCaseTupled (qual :Tree ,name :Name ,mode :Mode ): Tree =
5377- if (qual.symbol!= null && isScala3cross && qual.symbol.isModule&& qual.symbol.companion.isCase&&
5374+ def fixUpCaseTupled (tree : Tree , qual :Tree ,name :Name ,mode :Mode ): Tree =
5375+ if (qual.symbol!= null && currentRun.isScala3Cross && qual.symbol.isModule&& qual.symbol.companion.isCase&&
53785376 context.undetparams.isEmpty&& fixableFunctionMembers.contains(name)) {
5379- val t = Select (qual, nme.apply)
5380- val t1 = typedSelect(t, qual, nme.apply)
5381- val t2 = typed(Select (etaExpand(t1, context.owner), name), mode, pt)
5377+ val t2 = {
5378+ val t = atPos(tree.pos)(Select (qual, nme.apply))
5379+ val t1 = typedSelect(t, qual, nme.apply)
5380+ typed(atPos(tree.pos)(Select (etaExpand(t1, context.owner), name)), mode, pt)
5381+ }
53825382if (! t2.isErroneous) {
53835383val msg = s " The method `apply` is inserted. The auto insertion will be deprecated, please write ` ${t2}` explicitly. "
53845384 context.deprecationWarning(tree.pos, qual.symbol, msg," 2.13.13" )
@@ -5424,7 +5424,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
54245424if ((qual1 ne qual)&& ! qual1.isErrorTyped)
54255425 typed(treeCopy.Select (tree, qual1, name), mode, pt).tap(checkDubiousAdaptation)
54265426else
5427- fixUpCaseTupled(qual, name, mode)
5427+ fixUpCaseTupled(tree, qual, name, mode)
54285428if (! fixed.isEmpty)
54295429return fixed
54305430 }