Version
110.99.6.1 (Latest)
Operating System
OS Version
No response
Processor
System Component
Core system
Severity
Cosmetic
Description
The polyEqual warning is meant to warn users that the compiler is falling back to a non-synthesized equality test.
However, this warning occurs on completely legitimate uses on the array type.
Transcript
- val arr : char array = Array.array (10, #"x");
- arr = arr;
stdIn:2.5 Warning: calling polyEqual
val it = true : bool
Expected Behavior
- val arr : char array = Array.array (10, #"x");
- arr = arr;
val it = true : bool
This should probably not produce a warning even if the type is polymorphic, just like how ref works.
- fun myArrEq (a1 : 'a array, a2 : 'a array) : bool = a1 = a2;
val it = fn : 'a array * 'a array -> bool
Steps to Reproduce
Write = on arrays.
Additional Information
This is probably fairly easy to special-case for now, but the polyEqual warning needs an overhaul.
The warning should really be based on the type of expressions (ie. the warning should occur before the backend), rather than the contents of the optimized intermediate language.
We should be able to guarantee that all well-understood uses of op = are specialized.
Email address
skyler DOT soss AT gmail DOT com
Version
110.99.6.1 (Latest)
Operating System
OS Version
No response
Processor
System Component
Core system
Severity
Cosmetic
Description
The
polyEqualwarning is meant to warn users that the compiler is falling back to a non-synthesized equality test.However, this warning occurs on completely legitimate uses on the
arraytype.Transcript
Expected Behavior
This should probably not produce a warning even if the type is polymorphic, just like how
refworks.Steps to Reproduce
Write
=on arrays.Additional Information
This is probably fairly easy to special-case for now, but the
polyEqualwarning needs an overhaul.The warning should really be based on the type of expressions (ie. the warning should occur before the backend), rather than the contents of the optimized intermediate language.
We should be able to guarantee that all well-understood uses of
op =are specialized.Email address
skyler DOT soss AT gmail DOT com