File tree Expand file tree Collapse file tree 5 files changed +1
-16
lines changed
compiler/src/dotty/tools/dotc
library/src/scala/annotation
tests/run-tasty-inspector Expand file tree Collapse file tree 5 files changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -536,6 +536,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
536536 else
537537 val trefs =
538538 if refs.isEmpty then ref(defn.NothingType )
539+ // TODO: choose a reduce direction
539540 else refs.map(SingletonTypeTree ).reduce[Tree ]((a, b) => makeOrType(a, b))
540541 annot = New (AppliedTypeTree (annot, trefs :: Nil ), Nil )
541542 annot.putAttachment(RetainsAnnot , ())
Original file line number Diff line number Diff line change @@ -1097,7 +1097,6 @@ class Definitions {
10971097 @ tu lazy val RetainsAnnot : ClassSymbol = requiredClass(" scala.annotation.retains" )
10981098 @ tu lazy val RetainsCapAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsCap" )
10991099 @ tu lazy val RetainsByNameAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsByName" )
1100- @ tu lazy val RetainsArgAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsArg" )
11011100 @ tu lazy val PublicInBinaryAnnot : ClassSymbol = requiredClass(" scala.annotation.publicInBinary" )
11021101 @ tu lazy val WitnessNamesAnnot : ClassSymbol = requiredClass(" scala.annotation.internal.WitnessNames" )
11031102
Original file line number Diff line number Diff line change @@ -4524,15 +4524,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
45244524 true
45254525 }
45264526
4527- def isRetainsArg (pt : Type ) = pt match
4528- case AnnotatedType (arg, annot) => annot.symbol == defn.RetainsArgAnnot
4529- case _ => false
4530-
45314527 if (implicitFun || caseCompanion)
45324528 && ! isApplyProto(pt)
45334529 && pt != SingletonTypeProto
45344530 && pt != LhsProto
4535- && ! isRetainsArg(pt)
45364531 && ! ctx.mode.is(Mode .Pattern )
45374532 && ! tree.isInstanceOf [SplicePattern ]
45384533 && ! ctx.isAfterTyper
Original file line number Diff line number Diff line change @@ -20,12 +20,3 @@ class retains[Elems] extends annotation.StaticAnnotation
2020class retainsCap extends annotation.StaticAnnotation
2121 // This special case is needed to be able to load standard library modules without
2222 // cyclic reference errors. Specifically, load sequences involving IterableOnce.
23-
24- /** Internal use, only for parameters of `retains` and `retainsByName`.
25- */
26- @ experimental
27- class retainsArg extends annotation.StaticAnnotation
28- // This annotation prevents argument references to retains and retainsByName from being
29- // augmented with explicit arguments. That's unsound in general, but necessary
30- // since a captureRef could have an impure context function type, A ?=> B, but
31- // we still need to have the unapplied captureRef in the annotation.
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ val experimentalDefinitionInLibrary = Set(
3030 " scala.annotation.retains" ,
3131 " scala.annotation.retainsByName" ,
3232 " scala.annotation.retainsCap" ,
33- " scala.annotation.retainsArg" ,
3433 " scala.Pure" ,
3534 " scala.caps.CapSet" ,
3635 " scala.caps.Capability" ,
You can’t perform that action at this time.
0 commit comments