aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorjvican <jorgevc@fastmail.es>2016-07-01 11:05:24 +0200
committerjvican <jorgevc@fastmail.es>2016-07-01 11:05:24 +0200
commit7f43e4918715330c1407d5723ce73d023ca4229c (patch)
treeb5d358272bf0edc109e5e84cfa18822f31562b61 /src/dotty/tools/dotc/typer/Typer.scala
parentb35eff93fd6ad23bc2ac2ee81952c435a7a90961 (diff)
downloaddotty-7f43e4918715330c1407d5723ce73d023ca4229c.tar.gz
dotty-7f43e4918715330c1407d5723ce73d023ca4229c.tar.bz2
dotty-7f43e4918715330c1407d5723ce73d023ca4229c.zip
Add straightforward fix to #1308
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-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)
}