[Issue 4953] Regression(2.031): templates don't do implicit conversion properly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 25 01:38:59 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4953
Erik Baklund <ebaklund at hotmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebaklund at hotmail.com
--- Comment #9 from Erik Baklund <ebaklund at hotmail.com> 2011-09-25 01:38:23 PDT ---
Yet another example:
module main;
struct MyStruct
{
void funOpAssign(float[1u] data) { }
void opOpAssign(string op)(float[1u] data) if(op=="<<") { }
}
int main(string[] argv)
{
// dmd v2.054, v2.055
MyStruct s;
float[1u] a = [1.0f]; // OK: Implicit cast from float[] compiles
s.funOpAssign([1.0f]); // OK: Implicit cast from float[] compiles
s <<= [1.0f]; // Issue: Implicit cast from float[] does not compile
s <<= cast(float[1u])[1.0f]; // OK: Explicit cast from float[] compiles
return 0;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list