File tree Expand file tree Collapse file tree 6 files changed +1
-18
lines changed
compiler/src/dotty/tools/dotc
library/src/scala/annotation
tests/run-tasty-inspector Expand file tree Collapse file tree 6 files changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ object Trees {
3434
3535 val SyntheticUnit : Property .StickyKey [Unit ] = Property .StickyKey ()
3636
37- val CaptureVarDef : Property .StickyKey [Unit ] = Property .StickyKey ()
38-
3937 /** Trees take a parameter indicating what the type of their `tpe` field
4038 * is. Two choices: `Type` or `Untyped`.
4139 * Untyped trees have type `Tree[Untyped]`.
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 @@ -1093,7 +1093,6 @@ class Definitions {
10931093 @ tu lazy val RetainsAnnot : ClassSymbol = requiredClass(" scala.annotation.retains" )
10941094 @ tu lazy val RetainsCapAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsCap" )
10951095 @ tu lazy val RetainsByNameAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsByName" )
1096- @ tu lazy val RetainsArgAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsArg" )
10971096 @ tu lazy val PublicInBinaryAnnot : ClassSymbol = requiredClass(" scala.annotation.publicInBinary" )
10981097 @ tu lazy val WitnessNamesAnnot : ClassSymbol = requiredClass(" scala.annotation.internal.WitnessNames" )
10991098
Original file line number Diff line number Diff line change @@ -4497,15 +4497,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
44974497 true
44984498 }
44994499
4500- def isRetainsArg (pt : Type ) = pt match
4501- case AnnotatedType (arg, annot) => annot.symbol == defn.RetainsArgAnnot
4502- case _ => false
4503-
45044500 if (implicitFun || caseCompanion)
45054501 && ! isApplyProto(pt)
45064502 && pt != SingletonTypeProto
45074503 && pt != LhsProto
4508- && ! isRetainsArg(pt)
45094504 && ! ctx.mode.is(Mode .Pattern )
45104505 && ! tree.isInstanceOf [SplicePattern ]
45114506 && ! 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