We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c32869 commit 80f3565Copy full SHA for 80f3565
compiler/src/dotty/tools/dotc/cc/CaptureOps.scala
@@ -922,11 +922,8 @@ object OnlyCapability:
922
923
def unapply(tree: AnnotatedType)(using Context): Option[(Type, ClassSymbol)] = tree match
924
case AnnotatedType(parent: Type, ann) if ann.hasSymbol(defn.OnlyCapabilityAnnot) =>
925
- ann.tree.tpe.argTypes.head.dealias match
926
- case tp: TypeRef if tp.symbol.isClass =>
927
- tp.symbol match
928
- case cls: ClassSymbol => Some((parent, cls))
929
- case _ => None
+ ann.tree.tpe.argTypes.head.dealias.typeSymbol match
+ case cls: ClassSymbol => Some((parent, cls))
930
case _ => None
931
932
end OnlyCapability
0 commit comments