Index: src/ControlStruct/TranslateEnumRange.cpp
===================================================================
--- src/ControlStruct/TranslateEnumRange.cpp	(revision d3aa55e994d9978b6eeed324d12124cd1e92a452)
+++ src/ControlStruct/TranslateEnumRange.cpp	(revision bc071901ad9345e63409b54d169b7000a53936df)
@@ -91,11 +91,14 @@
     ast::UntypedExpr * condition = ast::UntypedExpr::createCall( location,
         "?<=?",
-        { 
-            ast::UntypedExpr::createCall(location, "posn", { new ast::NameExpr( location, indexName ) } ),
-            ast::ConstantExpr::from_ulong( location, enumDecl->members.size()-1 )
-        });
+        {new ast::CastExpr(location,
+            new ast::NameExpr( location, indexName ),
+            new ast::BasicType( ast::BasicKind::UnsignedInt ),
+            ast::GeneratedFlag::ExplicitCast),
+        ast::ConstantExpr::from_ulong( location, enumDecl->members.size()-1 ) });
+
     auto increment = ast::UntypedExpr::createCall( location, 
-        stmt->is_inc? "succ": "pred",
+        stmt->is_inc? "?++": "?--",
         { new ast::NameExpr( location, indexName ) });
+    
     auto assig = ast::UntypedExpr::createAssign( location, new ast::NameExpr( location, indexName ), increment );
     auto mut = ast::mutate_field( stmt, &ast::ForStmt::cond, condition );
