We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
hasAnnotation
@use
@consume
1 parent 9bdf3a7 commit 3dcaf59Copy full SHA for 3dcaf59
compiler/src/dotty/tools/dotc/cc/CaptureOps.scala
@@ -497,8 +497,7 @@ extension (sym: Symbol)
497
* @use-annotated term parameter that contains `sym` in its deep capture set.
498
*/
499
def isUseParam(using Context): Boolean =
500
- sym.hasAnnotation(defn.UseAnnot)
501
- || sym.info.hasAnnotation(defn.UseAnnot)
+ sym.info.hasAnnotation(defn.UseAnnot)
502
|| sym.is(TypeParam)
503
&& sym.owner.rawParamss.nestedExists: param =>
504
param.is(TermParam) && param.hasAnnotation(defn.UseAnnot)
@@ -508,8 +507,7 @@ extension (sym: Symbol)
508
507
509
/** `sym` or its info is annotated with `@consume`. */
510
def isConsumeParam(using Context): Boolean =
511
- sym.hasAnnotation(defn.ConsumeAnnot)
512
- || sym.info.hasAnnotation(defn.ConsumeAnnot)
+ sym.info.hasAnnotation(defn.ConsumeAnnot)
513
514
def isUpdateMethod(using Context): Boolean =
515
sym.isAllOf(Mutable | Method, butNot = Accessor)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments