Ticket #60 (closed defect: fixed)
Matching against literal strings is broken
| Reported by: | benl | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.1.5 |
| Component: | Source Desugarer | Version: | 0.1.2 |
| Keywords: | Cc: |
Description
With source
foo x = case x of "hello" -> 5 "goodbye" -> 47 main () = putStr $ show $ foo "hello"
We get:
./test/Broken-skip/T60-StringMatch/Main.ddc.c: In function ‘Main_foo’: ./test/Broken-skip/T60-StringMatch/Main.ddc.c:27: error: switch quantity not an integer ./test/Broken-skip/T60-StringMatch/Main.ddc.c:28: error: case label does not reduce to an integer constant ./test/Broken-skip/T60-StringMatch/Main.ddc.c:41: error: switch quantity not an integer ./test/Broken-skip/T60-StringMatch/Main.ddc.c:42: error: case label does not reduce to an integer constant
Change History
Note: See
TracTickets for help on using
tickets.
