File tree 1 file changed +3
-3
lines changed
scalafix/rules/src/main/scala/fix
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ import scala.meta._
8
8
case class Scalacollectioncompat_newcollections (index : SemanticdbIndex )
9
9
extends SemanticRule (index, " Scalacollectioncompat_newcollections" ) {
10
10
11
- // terms dont give us terms https://github.com/scalameta/scalameta/issues/1212
11
+ // WARNING: TOTAL HACK
12
+ // this is only to unblock us until Term.tpe is available: https://github.com/scalameta/scalameta/issues/1212
12
13
// if we have a simple identifier, we can look at his definition at query it's type
13
14
// this should be improved in future version of scalameta
14
15
object TypeMatcher {
@@ -19,8 +20,7 @@ case class Scalacollectioncompat_newcollections(index: SemanticdbIndex)
19
20
final class TypeMatcher (symbols : Symbol * )(implicit index : SemanticdbIndex ) {
20
21
def unapply (tree : Tree ): Boolean = {
21
22
index.denotation(tree)
22
- .map(_.names.headOption.exists(n => symbols.exists(_ == n.symbol)))
23
- .getOrElse(false )
23
+ .exists(_.names.headOption.exists(n => symbols.exists(_ == n.symbol)))
24
24
}
25
25
}
26
26
You can’t perform that action at this time.
0 commit comments