Skip to content

Commit 0a7ed0e

Browse files
authored
Merge pull request #182 from retronym/null-check
Avoid NPE with import trees
2 parents 1802797 + 46cd615 commit 0a7ed0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/scala/async/internal/TransformUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ private[async] trait TransformUtils {
528528
def addUncheckedBounds(t: Tree) = {
529529
typingTransform(t, owner) {
530530
(tree, api) =>
531-
internal.setType(api.default(tree), uncheckedBoundsIfNeeded(tree.tpe))
531+
if (tree.tpe == null) tree else internal.setType(api.default(tree), uncheckedBoundsIfNeeded(tree.tpe))
532532
}
533533

534534
}

0 commit comments

Comments
 (0)