Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schlichtherle committed Apr 21, 2021
1 parent e8f9248 commit af30978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scala/src/main/scala/bali/scala/Make.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ private final class Make(val c: blackbox.Context) {

Option
.when(isModule && lookupAnnotation.isEmpty)(makeDependency)
.orElse(typecheck(lookupDefTree, mode = c.TERMmode).map(callDependency))
.orElse(typecheck(lookupNameTree, mode = c.TYPEmode).map(abortWrongType))
.orElse(typecheck(lookupDefTree).map(callDependency))
.orElse(typecheck(lookupNameTree).map(abortWrongType))
.getOrElse(abortNotFound)
}

Expand All @@ -111,8 +111,8 @@ private final class Make(val c: blackbox.Context) {
}
}

private def typecheck(tree: Tree, mode: c.TypecheckMode, pt: Type = WildcardType) = {
c.typecheck(tree, mode = mode, pt = pt, silent = true) match {
private def typecheck(tree: Tree) = {
c.typecheck(tree, silent = true) match {
case EmptyTree => None
case typecheckedTree => Some(typecheckedTree)
}
Expand Down

0 comments on commit af30978

Please sign in to comment.