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 1116, Thu May 5 04:49:02 2011 UTC revision 1296, Thu Jun 9 12:42:09 2011 UTC
# Line 518  Line 518 
518                          (AST.S_Assign(x', e'), env)                          (AST.S_Assign(x', e'), env)
519                        end                        end
520                  (* end case *))                  (* end case *))
521                | PT.S_OpAssign(x, rator, e) => (case Env.findVar (#env env, x)
522                     of SOME x' => let
523                          val e1' = AST.E_Var x'
524                          val ty1 = Var.monoTypeOf x'
525                          val (e2', ty2) = checkExpr(env, cxt, e)
526                          val ovldList = Env.findFunc (#env env, rator)
527                          val (rhs, _) = resolveOverload (cxt, rator, [ty1, ty2], [e1', e2'], ovldList)
528                          in
529                            (AST.S_Assign(x', rhs), env)
530                          end
531                      | NONE => err(cxt, [S "undeclared variable ", A x, S " on lhs of ", A rator])
532                    (* end case *))
533              | PT.S_New(strand, args) => let              | PT.S_New(strand, args) => let
534                  val argsAndTys' = List.map (fn e => checkExpr(env, cxt, e)) args                  val argsAndTys' = List.map (fn e => checkExpr(env, cxt, e)) args
535                  val (args', tys') = ListPair.unzip argsAndTys'                  val (args', tys') = ListPair.unzip argsAndTys'

Legend:
Removed from v.1116  
changed lines
  Added in v.1296

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