on master help sign in
Fix #1172, destruct chars before pattern matching
commit84b741d52b85ed9f1558c760c334d5f1e47f9e13 authorEvan Czaplicki <info@elm-lang.org> dateTue 17 Nov 2015, 10:24 (11 years ago) parent8428174
1 file changed+3
src/Generate/JavaScript/Expression.hs+3
src/Generate/JavaScript/Expression.hs+3
@@ -404,6 +404,9 @@ pathToTestableExpr root path exampleTest =
404404 DT.Constructor _ ->
405405 return (DotRef () accessExpr (Id () "ctor"))
406406
407+ DT.Literal (L.Chr _) ->
408+ return (DotRef () accessExpr (Id () "valueOf") `call` [])
409+
407410 DT.Literal _ ->
408411 return accessExpr
409412