« Bugzilla Issues Index
#674 — [11.11 Binary Logical Operators] step 4 always returns a boolean value instead of the lhs operand
- bug_id:
674
- creation_ts:
2012-09-29 13:09:00 -0700
- short_desc:
[11.11 Binary Logical Operators] step 4 always returns a boolean value instead of the lhs operand
- delta_ts:
2012-10-26 15:34:18 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 10: September 27, 2012 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
normal
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
1791
- comment_count:
0
- who:
André Bargull
- bug_when:
2012-09-29 13:09:27 -0700
Step 4 always returns a boolean value, cf. step 2:
---
1. Let lref be the result of evaluating LogicalANDExpression.
2. Let lval be ToBoolean(GetValue(lref)).
3. ReturnIfAbrupt(lval).
4. If lval is false, return lval.
5. Let rref be the result of evaluating BitwiseORExpression.
6. Return GetValue(rref).
---
Two additional algorithm steps may be necessary:
---
1. Let lref be the result of evaluating LogicalANDExpression.
2. Let lval be GetValue(lref).
3. ReturnIfAbrupt(lval).
*NEW* 4. Let lbool be ToBoolean(lval).
*NEW* 5. ReturnIfAbrupt(lbool).
6. If lbool is false, return lval.
7. Let rref be the result of evaluating BitwiseORExpression.
8. Return GetValue(rref).
---
Same applies to LogicalORExpression.
- commentid:
2075
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2012-10-25 18:07:09 -0700
corrected in rev 11 editor's draft
- commentid:
2139
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2012-10-26 15:34:18 -0700
in October 26, 2012 release draft