Skip to content

Commit 00bfbbd

Browse files
author
Aggelos Biboudis
authored
Merge pull request #5695 from dotty-staging/fix-trasty-reflect-flags-in-sdb
Update to new API for flags
2 parents 845fd59 + 79fbd31 commit 00bfbbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

semanticdb/src/dotty/semanticdb/SemanticdbConsumer.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SemanticdbConsumer extends TastyConsumer {
6464

6565
implicit class SymbolExtender(symbol: Symbol) {
6666
def isTypeParameter: Boolean = symbol match {
67-
case IsTypeSymbol(_) => symbol.flags.isParam
67+
case IsTypeSymbol(_) => symbol.flags.is(Flags.Param)
6868
case _ => false
6969
}
7070

@@ -83,21 +83,21 @@ class SemanticdbConsumer extends TastyConsumer {
8383
case _ => false
8484
}
8585

86-
def isObject: Boolean = symbol.flags.isObject
86+
def isObject: Boolean = symbol.flags.is(Flags.Object)
8787

88-
def isTrait: Boolean = symbol.flags.isTrait
88+
def isTrait: Boolean = symbol.flags.is(Flags.Trait)
8989

90-
def isValueParameter: Boolean = symbol.flags.isParam
90+
def isValueParameter: Boolean = symbol.flags.is(Flags.Param)
9191

9292
// TODO : implement it
9393
def isJavaClass: Boolean = false
9494
}
9595

9696
def resolveClass(symbol: ClassSymbol): Symbol =
9797
(symbol.companionClass, symbol.companionModule) match {
98-
case (_, Some(module)) if symbol.flags.isObject => module
99-
case (Some(c), _) => c
100-
case _ => symbol
98+
case (_, Some(module)) if symbol.flags.is(Flags.Object) => module
99+
case (Some(c), _) => c
100+
case _ => symbol
101101
}
102102

103103
def disimbiguate(symbol_path: String, symbol: Symbol): String = {

0 commit comments

Comments
 (0)