Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/typechecker/typechecker.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/typechecker/typechecker.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2248, Mon Mar 4 15:21:32 2013 UTC revision 2249, Mon Mar 4 18:23:35 2013 UTC
# Line 784  Line 784 
784                              val Env.PrimFun ovldList = Env.findFunc (#env env, rator)                              val Env.PrimFun ovldList = Env.findFunc (#env env, rator)
785                              val (rhs, _) = resolveOverload (cxt, rator, [ty1, ty2], [e1', e2'], ovldList)                              val (rhs, _) = resolveOverload (cxt, rator, [ty1, ty2], [e1', e2'], ovldList)
786                              in                              in
787                                (* check that x' is mutable *)
788                                  case Var.kindOf x'
789                                   of Var.StrandStateVar => ()
790                                    | Var.StrandOutputVar => ()
791                                    | Var.LocalVar => ()
792                                    | _ => err(cxt, [
793                                          S "assignment to immutable variable ", A x
794                                        ])
795                                  (* end case *);
796                                (AST.S_Assign(x', rhs), env)                                (AST.S_Assign(x', rhs), env)
797                              end                              end
798                          | NONE => err(cxt, [S "undeclared variable ", A x, S " on lhs of ", A rator])                          | NONE => err(cxt, [S "undeclared variable ", A x, S " on lhs of ", A rator])

Legend:
Removed from v.2248  
changed lines
  Added in v.2249

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0