Skip to content

Commit 33b7aa8

Browse files
committed
Remove unnecessary casts
1 parent 20b404d commit 33b7aa8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
301301
for(annot <- annotations; if shouldEmitAnnotation(annot)) {
302302
val typ = annot.tree.tpe
303303
val assocs = assocsFromApply(annot.tree)
304-
val av = cw.visitAnnotation(typeDescriptor(typ.asInstanceOf[Type]), isRuntimeVisible(annot))
304+
val av = cw.visitAnnotation(typeDescriptor(typ), isRuntimeVisible(annot))
305305
emitAssocs(av, assocs, BCodeHelpers.this)(this)
306306
}
307307

@@ -312,7 +312,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
312312
for(annot <- annotations; if shouldEmitAnnotation(annot)) {
313313
val typ = annot.tree.tpe
314314
val assocs = assocsFromApply(annot.tree)
315-
val av = mw.visitAnnotation(typeDescriptor(typ.asInstanceOf[Type]), isRuntimeVisible(annot))
315+
val av = mw.visitAnnotation(typeDescriptor(typ), isRuntimeVisible(annot))
316316
emitAssocs(av, assocs, BCodeHelpers.this)(this)
317317
}
318318

@@ -323,7 +323,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
323323
for(annot <- annotations; if shouldEmitAnnotation(annot)) {
324324
val typ = annot.tree.tpe
325325
val assocs = assocsFromApply(annot.tree)
326-
val av = fw.visitAnnotation(typeDescriptor(typ.asInstanceOf[Type]), isRuntimeVisible(annot))
326+
val av = fw.visitAnnotation(typeDescriptor(typ), isRuntimeVisible(annot))
327327
emitAssocs(av, assocs, BCodeHelpers.this)(this)
328328
}
329329

0 commit comments

Comments
 (0)