File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
scalafix/rules/src/main/scala/fix Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ case class Scalacollectioncompat_newcollections(index: SemanticdbIndex)
27
27
} yield (open, close)
28
28
29
29
// terms dont give us terms https://github.com/scalameta/scalameta/issues/1212
30
+ // WARNING: TOTAL HACK
31
+ // this is only to unblock us until Term.tpe is available: https://github.com/scalameta/scalameta/issues/1212
30
32
// if we have a simple identifier, we can look at his definition at query it's type
31
33
// this should be improved in future version of scalameta
32
34
object TypeMatcher {
@@ -37,8 +39,7 @@ case class Scalacollectioncompat_newcollections(index: SemanticdbIndex)
37
39
final class TypeMatcher (symbols : Symbol * )(implicit index : SemanticdbIndex ) {
38
40
def unapply (tree : Tree ): Boolean = {
39
41
index.denotation(tree)
40
- .map(_.names.headOption.exists(n => symbols.exists(_ == n.symbol)))
41
- .getOrElse(false )
42
+ .exists(_.names.headOption.exists(n => symbols.exists(_ == n.symbol)))
42
43
}
43
44
}
44
45
You can’t perform that action at this time.
0 commit comments