Skip to content

Commit 95e7f24

Browse files
committed
QuickFix Quickfix #2704
1 parent 40c7af3 commit 95e7f24

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
224224
def shouldEmitAnnotation(annot: Annotation): Boolean = {
225225
annot.symbol.isJavaDefined &&
226226
retentionPolicyOf(annot) != AnnotationRetentionSourceAttr &&
227-
annot.args.isEmpty &&
228-
!annot.tree.isInstanceOf[Block] // unblocking Olaf, needs a proper fix
227+
annot.args.isEmpty
229228
}
230229

231230
private def retentionPolicyOf(annot: Annotation): Symbol =
@@ -526,13 +525,19 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
526525
def args: List[Tree] = List.empty // those arguments to scala-defined annotations. they are never emmited
527526
}
528527

529-
def assocsFromApply(tree: Tree) = {
528+
def assocsFromApply(tree: Tree): List[(Name, Tree)] = {
530529
tree match {
531530
case Block(_, expr) => assocsFromApply(expr)
532531
case Apply(fun, args) =>
533532
fun.tpe.widen match {
534533
case MethodType(names) =>
535-
names zip args
534+
(names zip args).filter{x => x match {
535+
case t: tpd.Ident if (t.tpe.normalizedPrefix eq NoPrefix) =>
536+
false
537+
case _ => true
538+
}
539+
540+
}
536541
}
537542
}
538543
}

0 commit comments

Comments
 (0)