Skip to content

Commit 1c5340e

Browse files
committed
Add a test for dummy symbols
1 parent 188f378 commit 1c5340e

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

compiler/src/dotty/tools/dotc/cc/CaptureOps.scala

-16
Original file line numberDiff line numberDiff line change
@@ -652,22 +652,6 @@ trait FollowAliasesMap(using Context) extends TypeMap:
652652
else t
653653
else mapOver(t)
654654

655-
/** An extractor for `caps.reachCapability(ref)`, which is used to express a reach
656-
* capability as a tree in a @retains annotation.
657-
*/
658-
// object ReachCapabilityApply:
659-
// def unapply(tree: Apply)(using Context): Option[Tree] = tree match
660-
// case Apply(reach, arg :: Nil) if reach.symbol == defn.Caps_reachCapability => Some(arg)
661-
// case _ => None
662-
663-
/** An extractor for `caps.readOnlyCapability(ref)`, which is used to express a read-only
664-
* capability as a tree in a @retains annotation.
665-
*/
666-
// object ReadOnlyCapabilityApply:
667-
// def unapply(tree: Apply)(using Context): Option[Tree] = tree match
668-
// case Apply(ro, arg :: Nil) if ro.symbol == defn.Caps_readOnlyCapability => Some(arg)
669-
// case _ => None
670-
671655
abstract class AnnotatedCapability(annotCls: Context ?=> ClassSymbol):
672656
def apply(tp: Type)(using Context): AnnotatedType =
673657
assert(tp.isTrackableRef, i"not a trackable ref: $tp")

compiler/src/dotty/tools/dotc/core/Flags.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ object Flags {
451451

452452
/** Flags representing source modifiers */
453453
private val CommonSourceModifierFlags: FlagSet =
454-
commonFlags(Private, Protected, Final, Case, Implicit, Given, Override, JavaStatic, Transparent, Erased, CaptureParam)
454+
commonFlags(Private, Protected, Final, Case, Implicit, Given, Override, JavaStatic, Transparent, Erased)
455455

456456
val TypeSourceModifierFlags: FlagSet =
457457
CommonSourceModifierFlags.toTypeFlags | Abstract | Sealed | Opaque | Open
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import language.experimental.captureChecking
2+
3+
class A:
4+
type C^
5+
6+
def f(a: A): a.C = a.C // error
7+
def g[C^]: C = C // error

0 commit comments

Comments
 (0)