tools/pas2c/Pas2C.hs
branchwebgl
changeset 8446 c18ba8726f5a
parent 8444 75db7bb8dce8
child 9954 bf51bc7e2808
--- a/tools/pas2c/Pas2C.hs	Sun Jan 27 00:28:57 2013 +0100
+++ b/tools/pas2c/Pas2C.hs	Tue Feb 19 22:45:02 2013 +0400
@@ -786,7 +786,7 @@
     where
     elsePart | isNothing mphrase2 = return $ empty
              | otherwise = liftM (text "else" $$) $ (phrase2C . wrapPhrase) (fromJust mphrase2)
-phrase2C (Assignment ref expr) = do
+phrase2C asgn@(Assignment ref expr) = do
     r <- ref2C ref
     t <- gets lastType
     case (t, expr) of
@@ -804,7 +804,7 @@
                 BTString -> do
                     e <- expr2C expr
                     return $ r <+> text "=" <+> e <> semi
-                _ -> error $ "Assignment to string from " ++ show lt
+                _ -> error $ "Assignment to string from " ++ show asgn
         (BTArray _ _ _, _) -> do
             case expr of
                 Reference er -> do