aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2016-07-01 11:49:38 +0200
committerGitHub <noreply@github.com>2016-07-01 11:49:38 +0200
commit07fd8a357ed660ef15163efb2788928fec290fdd (patch)
treeb5d358272bf0edc109e5e84cfa18822f31562b61
parentb35eff93fd6ad23bc2ac2ee81952c435a7a90961 (diff)
parent7f43e4918715330c1407d5723ce73d023ca4229c (diff)
downloaddotty-07fd8a357ed660ef15163efb2788928fec290fdd.tar.gz
dotty-07fd8a357ed660ef15163efb2788928fec290fdd.tar.bz2
dotty-07fd8a357ed660ef15163efb2788928fec290fdd.zip
Merge pull request #1350 from dotty-jvican/issue-1308
Add straightforward fix to #1308
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index ae8900c43..268020ec5 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -566,7 +566,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
def typedIf(tree: untpd.If, pt: Type)(implicit ctx: Context) = track("typedIf") {
val cond1 = typed(tree.cond, defn.BooleanType)
val thenp1 = typed(tree.thenp, pt)
- val elsep1 = typed(tree.elsep orElse untpd.unitLiteral withPos tree.pos, pt)
+ val elsep1 = typed(tree.elsep orElse (untpd.unitLiteral withPos tree.pos), pt)
val thenp2 :: elsep2 :: Nil = harmonize(thenp1 :: elsep1 :: Nil)
assignType(cpy.If(tree)(cond1, thenp2, elsep2), thenp2, elsep2)
}