Skip to content

Commit 703019f

Browse files
committed
Fix tests
1 parent 4c576e9 commit 703019f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,12 +905,12 @@ object RefChecks {
905905
owner.isDeprecated
906906
|| isEnumOwner(owner)
907907

908-
def isDeprecatedOrSyntheticMethod(owner: Symbol) = owner.isDeprecated || owner.isAllOf(Method & Synthetic)
908+
def isDeprecatedOrSyntheticMethod(owner: Symbol) = owner.isDeprecated || (owner.isRealMethod && owner.is(Synthetic))
909909

910910
/**Scan the chain of outer declaring scopes from the current context
911911
* a deprecation warning will be skipped if one the following holds
912912
* for a given declaring scope:
913-
* - the symbol associated with the scope is also deprecated or synthetic method.
913+
* - the symbol associated with the scope is also deprecated or synthetic real method.
914914
* - if and only if `sym` is an enum case, the scope is either
915915
* a module that declares `sym`, or the companion class of the
916916
* module that declares `sym`.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@deprecated("no CaseClass", "0.1") case class CaseClass(rgb: Int)
1+
@deprecated("no CaseClass", "0.1") case class CaseClass(rgb: Int)

0 commit comments

Comments
 (0)