Skip to content

Commit 15cbe5a

Browse files
committed
Cleanup
1 parent 382314b commit 15cbe5a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ package dotc
33
package core
44

55
import Symbols.*, Types.*, Contexts.*, Constants.*, Phases.*
6-
import Decorators.i
7-
import StdNames.nme
86
import ast.tpd, tpd.*
97
import util.Spans.Span
108
import printing.{Showable, Printer}

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,12 @@ object Checking {
969969
|| (
970970
t match
971971
case Literal(_) => true
972-
case Ident(nme.WILDCARD) => true // example: tests/run/java-ann-super-class
972+
// `_` is used as placeholder for unspecified arguments of Java
973+
// annotations. Example: tests/run/java-ann-super-class
974+
case Ident(nme.WILDCARD) => true
973975
case Apply(fun, args) => isFunctionAllowed(fun) && args.forall(valid)
974976
case TypeApply(fun, args) => isFunctionAllowed(fun)
977+
// Support for `x.isInstanceOf[T]`. Probably not needed.
975978
//case TypeApply(meth @ Select(arg, _), _) if meth.symbol == defn.Any_asInstanceOf => valid(arg)
976979
case SeqLiteral(elems, _) => elems.forall(valid)
977980
case Typed(expr, _) => valid(expr)

0 commit comments

Comments
 (0)