Skip to content
Snippets Groups Projects
Commit 1fdb3046 authored by Régis Blanc's avatar Régis Blanc
Browse files

Type of lets should be based on their body, not their id

parent 05156cb2
Branches
Tags
No related merge requests found
......@@ -45,14 +45,14 @@ object Trees {
/* Like vals */
case class Let(binder: Identifier, value: Expr, body: Expr) extends Expr {
binder.markAsLetBinder
val et = binder.getType
val et = body.getType
if(et != Untyped)
setType(et)
}
//same as let, buf for mutable variable declaration
case class LetVar(binder: Identifier, value: Expr, body: Expr) extends Expr {
binder.markAsLetBinder
val et = binder.getType
val et = body.getType
if(et != Untyped)
setType(et)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment