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

SCM Repository

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

Diff of /trunk/src/compiler/typechecker/typechecker.sml

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

revision 171, Sat Jul 24 14:13:10 2010 UTC revision 173, Sat Jul 24 15:37:50 2010 UTC
# Line 334  Line 334 
334                        (* check that x' is mutable *)                        (* check that x' is mutable *)
335                          case Var.kindOf x'                          case Var.kindOf x'
336                           of Var.ActorStateVar => ()                           of Var.ActorStateVar => ()
337                              | Var.ActorOutputVar => ()
338                            | Var.LocalVar => ()                            | Var.LocalVar => ()
339                            | _ => err(cxt, [                            | _ => err(cxt, [
340                                  S "assignment to immutable variable ", A x                                  S "assignment to immutable variable ", A x
# Line 387  Line 388 
388          (* check the actor state variable definitions *)          (* check the actor state variable definitions *)
389            val (vds, env) = let            val (vds, env) = let
390                  fun checkStateVar ((isOut, vd), (vds, env)) = let                  fun checkStateVar ((isOut, vd), (vds, env)) = let
391                        val (x, x', e') = checkVarDecl ({globalScope=false, env=env}, cxt, AST.ActorStateVar, vd)                        val kind = if isOut then AST.ActorOutputVar else AST.ActorStateVar
392                          val (x, x', e') = checkVarDecl ({globalScope=false, env=env}, cxt, kind, vd)
393                        in                        in
394                          ((isOut, AST.VD_Decl(x', e'))::vds, Env.insertLocal(env, x, x'))                          (AST.VD_Decl(x', e')::vds, Env.insertLocal(env, x, x'))
395                        end                        end
396                  val (vds, env) = List.foldl checkStateVar ([], env) state                  val (vds, env) = List.foldl checkStateVar ([], env) state
397                  in                  in

Legend:
Removed from v.171  
changed lines
  Added in v.173

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