Skip to content

Commit

Permalink
Merge pull request #1464 from tanishiking/overridden-symbols
Browse files Browse the repository at this point in the history
Add accessor to `overriddenSymbols` to SymbolInformation
  • Loading branch information
bjaglin authored Sep 15, 2021
2 parents c87e7f5 + a92509c commit c68ff25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/developers/symbol-information.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ definition. A symbol information describes the symbols's
- properties: `final`, `abstract`, `implicit`
- type signature: class declarations, class parents, method parameters, ...
- visibility access: `private`, `protected`, ...
- overridden symbols: list of symbols that this symbol overrides

```scala mdoc:passthrough
import scalafix.internal.v1.SymbolInformationAnnotations._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ final class SymbolInformation private[scalafix] (
info.annotations.iterator
.map(annot => new SymtabFromProtobuf(symtab).sannotation(annot))
.toList
def overriddenSymbols: List[Symbol] =
info.overriddenSymbols.map(Symbol(_)).toList

/** @group utilty */
@utility def isSetter: Boolean = displayName.endsWith("_=")
Expand Down

0 comments on commit c68ff25

Please sign in to comment.