WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23614
switch (5.3) { case 5: print("FAIL!"); default: }
https://bugs.webkit.org/show_bug.cgi?id=23614
Summary
switch (5.3) { case 5: print("FAIL!"); default: }
Zoltan Herczeg
Reported
2009-01-29 00:08:00 PST
The quickfix of
bug #23469
is introduced a new bug. AP said I should open a new bug report for this. This is a copy of my comment: var a = 5.3 switch(val) { case 1: return 10 case 2: return 11 case 3: return 12 case 5: return 14 case 6: return 15 default: return 100 } The switch selects "case 5", because numberToInt32() converts 5.3 to 5, which is wrong in this case!
Attachments
The patch
(2.62 KB, patch)
2009-02-26 18:28 PST
,
Gavin Barraclough
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2009-01-29 00:42:08 PST
<
rdar://problem/6538908
>
Gavin Barraclough
Comment 2
2009-02-26 18:28:10 PST
Created
attachment 28058
[details]
The patch
Geoffrey Garen
Comment 3
2009-02-26 18:30:38 PST
Comment on
attachment 28058
[details]
The patch r=me with layout test please
Gavin Barraclough
Comment 4
2009-02-26 19:32:55 PST
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/interpreter/Interpreter.cpp Sending JavaScriptCore/jit/JITStubs.cpp Sending LayoutTests/ChangeLog Sending LayoutTests/fast/js/resources/switch-behaviour.js Sending LayoutTests/fast/js/switch-behaviour-expected.txt Transmitting file data ...... Committed revision 41277.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug