on master help sign in
Merge pull request #1173 from elm-lang/dev

Fix #1172, destruct chars before pattern matching

commitac6df8884cea1d88bfc038483c3fde8bac08c254 authorEvan Czaplicki <info@elm-lang.org> dateTue 17 Nov 2015, 10:47 (11 years ago) parent842817484b741d
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