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 {
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 @@ -1097,7 +1097,6 @@ class Definitions {
1097
1097
@ tu lazy val RetainsAnnot : ClassSymbol = requiredClass(" scala.annotation.retains" )
1098
1098
@ tu lazy val RetainsCapAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsCap" )
1099
1099
@ tu lazy val RetainsByNameAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsByName" )
1100
- @ tu lazy val RetainsArgAnnot : ClassSymbol = requiredClass(" scala.annotation.retainsArg" )
1101
1100
@ tu lazy val PublicInBinaryAnnot : ClassSymbol = requiredClass(" scala.annotation.publicInBinary" )
1102
1101
@ tu lazy val WitnessNamesAnnot : ClassSymbol = requiredClass(" scala.annotation.internal.WitnessNames" )
1103
1102
Original file line number Diff line number Diff line change @@ -4524,15 +4524,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4524
4524
true
4525
4525
}
4526
4526
4527
- def isRetainsArg (pt : Type ) = pt match
4528
- case AnnotatedType (arg, annot) => annot.symbol == defn.RetainsArgAnnot
4529
- case _ => false
4530
-
4531
4527
if (implicitFun || caseCompanion)
4532
4528
&& ! isApplyProto(pt)
4533
4529
&& pt != SingletonTypeProto
4534
4530
&& pt != LhsProto
4535
- && ! isRetainsArg(pt)
4536
4531
&& ! ctx.mode.is(Mode .Pattern )
4537
4532
&& ! tree.isInstanceOf [SplicePattern ]
4538
4533
&& ! 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