www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11525] New: REG(2.065): Error: 'a[] *= a[]' each element is not a scalar, it is a Complex!double

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525

           Summary: REG(2.065): Error: 'a[] *= a[]' each element is not a
                    scalar, it is a Complex!double
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timothee.cour2 gmail.com



01:15:17 PST ---
works in 2.064.2, fails in 2.065
import std.complex;
void main(){
  auto a=[Complex!double.init];
  a[]*=a[];
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com



I'm not sure this is supposed to work... Structs with overloaded operators
generally don't work with array operations.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525




01:32:00 PST ---

 I'm not sure this is supposed to work... Structs with overloaded operators
 generally don't work with array operations.
I don't see why it shouldn't be allowed (besides the fact that it did work up till now). Without this complex numbers are very much 2nd class citizens for example. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 16 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525




Yes, but unless the 2.064 behavior was intentional, this is an enhancement and
not a regression.  I remember this being discussed before but I don't know
where.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525






 I'm not sure this is supposed to work... Structs with overloaded operators
 generally don't work with array operations.
I don't see why it shouldn't be allowed (besides the fact that it did work up till now). Without this complex numbers are very much 2nd class citizens for example.
This change was introduced by fixing bug 11376.
 Yes, but unless the 2.064 behavior was intentional, this is an enhancement and
 not a regression.  I remember this being discussed before but I don't know
 where.
If an used array-op is not directly implemented in druntime, compiler will implicitly generate a function to implement the required array-op by using for-loop. So, if the array-op operand properly supports arithmetic operations (+, -, *, /, ...), corresponding array-op should also be accepted. So, this is really a regression IMO. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



https://github.com/D-Programming-Language/dmd/pull/2891

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/46bee52320310ed25e838e0dc3d99224fd7e6596
fix Issue 11525 - Error: 'a[] *= a[]' each element is not a scalar, it is a
Complex!double

https://github.com/D-Programming-Language/dmd/commit/9a7ebe8f4b84f406a68bb27fe11d1a769767278b


[REG2.065a] Issue 11525 - Error: 'a[] *= a[]' each element is not a scalar, it
is a Complex!double

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 30 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11525


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 30 2013