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 {
34
34
35
35
val SyntheticUnit : Property .StickyKey [Unit ] = Property .StickyKey ()
36
36
37
- val CaptureVarDef : Property .StickyKey [Unit ] = Property .StickyKey ()
38
-
39
37
/** Trees take a parameter indicating what the type of their `tpe` field
40
38
* is. Two choices: `Type` or `Untyped`.
41
39
* 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 {
536
536
else
537
537
val trefs =
538
538
if refs.isEmpty then ref(defn.NothingType )
539
+ // TODO: choose a reduce direction
539
540
else refs.map(SingletonTypeTree ).reduce[Tree ]((a, b) => makeOrType(a, b))
540
541
annot = New (AppliedTypeTree (annot, trefs :: Nil ), Nil )
541
542
annot.putAttachment(RetainsAnnot , ())
Original file line number Diff line number Diff line change @@ -1093,7 +1093,6 @@ class Definitions {
1093
1093
@ tu lazy val RetainsAnnot : ClassSymbol = requiredClass(" scala.annotation.retains" )
1094
1094
@ tu lazy val RetainsCapAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsCap" )
1095
1095
@ tu lazy val RetainsByNameAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsByName" )
1096
- @ tu lazy val RetainsArgAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsArg" )
1097
1096
@ tu lazy val PublicInBinaryAnnot : ClassSymbol = requiredClass(" scala.annotation.publicInBinary" )
1098
1097
@ tu lazy val WitnessNamesAnnot : ClassSymbol = requiredClass(" scala.annotation.internal.WitnessNames" )
1099
1098
Original file line number Diff line number Diff line change @@ -4497,15 +4497,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4497
4497
true
4498
4498
}
4499
4499
4500
- def isRetainsArg (pt : Type ) = pt match
4501
- case AnnotatedType (arg, annot) => annot.symbol == defn.RetainsArgAnnot
4502
- case _ => false
4503
-
4504
4500
if (implicitFun || caseCompanion)
4505
4501
&& ! isApplyProto(pt)
4506
4502
&& pt != SingletonTypeProto
4507
4503
&& pt != LhsProto
4508
- && ! isRetainsArg(pt)
4509
4504
&& ! ctx.mode.is(Mode .Pattern )
4510
4505
&& ! tree.isInstanceOf [SplicePattern ]
4511
4506
&& ! ctx.isAfterTyper
Original file line number Diff line number Diff line change @@ -20,12 +20,3 @@ class retains[Elems] extends annotation.StaticAnnotation
20
20
class retainsCap extends annotation.StaticAnnotation
21
21
// This special case is needed to be able to load standard library modules without
22
22
// 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(
30
30
" scala.annotation.retains" ,
31
31
" scala.annotation.retainsByName" ,
32
32
" scala.annotation.retainsCap" ,
33
- " scala.annotation.retainsArg" ,
34
33
" scala.Pure" ,
35
34
" scala.caps.CapSet" ,
36
35
" scala.caps.Capability" ,
You can’t perform that action at this time.
0 commit comments