on master help sign in
javascript: fix detection of constant constructors
commit82750fd8969d35949e274a3b5dfbda5bc72e154f authorraichoo <raichoo@googlemail.com> dateThu 13 Feb 2014, 20:40 (13 years ago) parent96f81b3
1 file changed+2−1
src/IRTS/CodegenJavaScript.hs+2−1
src/IRTS/CodegenJavaScript.hs+2−1
@@ -428,7 +428,8 @@ isJSConstantConstructor constants js
428428 all (isJSConstantConstructor constants) vals
429429 | JSNew "__IDRRT__Con" args <- js =
430430 all (isJSConstantConstructor constants) args
431− | JSIndex (JSProj (JSIdent _) "vars") (JSNum _) <- js =
431+ | JSIndex (JSProj (JSIdent name) "vars") (JSNum _) <- js
432+ , name `elem` constants =
432433 True
433434 | JSIdent name <- js
434435 , name `elem` constants =