Closed Bug 707612 Opened 14 years ago Closed 14 years ago

[ASC BUG] Strict mode errors out on *-typed data in mixed arithmetic with float4

Categories

(Tamarin Graveyard :: Tools, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Q2 12 - Cyril

People

(Reporter: lhansen, Assigned: lhansen)

References

Details

Strict mode should never complain about '*'. Test case: package { var x:float4 = float4(0); var y:* = 37; print(x*y); } Compile: bash-3.2$ java -jar asc-float/lib/asc.jar -import tr-float/generated/builtin.abc -import tr-float/generated/shell_toplevel.abc -strict -AS3 -abcfuture asc.as [Compiler] Error #1067: Implicit coercion of a value of type float4 to an unrelated type Number. asc.as, Ln 4, Col 8: print(x*y); .......^ I could see this for a "coach" mode or a "performance" mode (we really need one), but not for plain "strict". Sufficiently annoying that P2 (blocks first release) seems in order.
Also note the error message is all wrong.
Similar to bug #706399?
Could be same underlying cause; I ended up doing a different bug because that bug is about typed arguments and this bug is about untyped arguments.
Assignee: nobody → lhansen
Changing from lhs == float4 && rhs == float4 to lhs == float4 || rhs == float4 in ConstantEvaluator / BinaryExpressionNode fixes this problem.
changeset: 78:fcbc9c325af9 tag: tip user: Lars T Hansen <lhansen@adobe.com> date: Tue Dec 06 15:54:36 2011 +0100 summary: Fix several bugs (unavailable atm due to bugzilla downage), dealing with comparison with undefined and mixed math with float4 as one operand, all in strict mode.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.