Skip to content

Commit

Permalink
Bring in #17263 to fix the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd authored and Kordyjan committed Apr 17, 2023
1 parent d414d3a commit d551be3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CheckUnused private (phaseMode: CheckUnused.PhaseMode, suffix: String, _ke

override def prepareForDefDef(tree: tpd.DefDef)(using Context): Context =
unusedDataApply{ ud =>
if !tree.rawMods.is(Private) then
if !tree.symbol.is(Private) then
tree.termParamss.flatten.foreach { p =>
ud.addIgnoredParam(p.symbol)
}
Expand Down
3 changes: 0 additions & 3 deletions tests/neg-custom-args/fatal-warnings/i15503i.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ package foo.test.scala.annotation:
def a1(a: Int) = a // OK
def a2(a: Int) = default_int // ok

private def a2_p(a: Int) = default_int // error
def a2_p_used = a2_p(3)

def a3(@unused a: Int) = default_int //OK

def b1 =
Expand Down

0 comments on commit d551be3

Please sign in to comment.