diff --git a/src/hx/cppia/Cppia.h b/src/hx/cppia/Cppia.h index b8361537c..0137f2937 100644 --- a/src/hx/cppia/Cppia.h +++ b/src/hx/cppia/Cppia.h @@ -1083,6 +1083,14 @@ struct NAME \ ioVal = left OP f; \ return ioVal; \ } \ + inline static int &run(int &ioVal, hx::CppiaCtx *ctx, hx::CppiaExpr *value) \ + { \ + int left = ioVal; \ + int i = value->runInt(ctx); \ + BCR_CHECK_RET(ioVal); \ + ioVal = left OP i; \ + return ioVal; \ + } \ static bool run(bool &ioVal, hx::CppiaCtx *ctx, hx::CppiaExpr *value) { value->runVoid(ctx); return ioVal; } \ static String run(String &ioVal, hx::CppiaCtx *ctx, hx::CppiaExpr *value) { value->runVoid(ctx); return ioVal; } \ static hx::Object *run(hx::Object * &ioVal, hx::CppiaCtx *ctx, hx::CppiaExpr *value) \ diff --git a/test/cppia/Client.hx b/test/cppia/Client.hx index 67842a75a..391945db2 100644 --- a/test/cppia/Client.hx +++ b/test/cppia/Client.hx @@ -189,6 +189,14 @@ class Client default: } + // regression test for #1257 + var x = 1290555; + x *= 1290555; + if (x != -915102823) { + Common.status = 'Failed regression test for #1257. x: $x'; + return; + } + final extending = new ClientExtendedExtendedRoot(); extending.addValue();