[Issue 12461] New: Typedef and opOpAssign
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 25 05:45:17 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12461
Summary: Typedef and opOpAssign
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: john.loughran.colvin at gmail.com
--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2014-03-25 12:45:13 GMT ---
Typedef really doesn't work.
import std.typecons;
alias Int = Typedef!(int);
unittest
{
Int a, b;
a += b;
}
typecons.d-mixin-3918(3918): Error: incompatible types for
(this.Typedef_payload) += (v)): 'int' and 'Typedef!(int, 0)'
/d32/f264.d(8): Error: template instance std.typecons.Typedef!(int,
0).Typedef.Proxy!(Typedef_payload).opOpAssign!("+", Typedef!(int, 0),
Typedef!(int, 0)) error instantiating
/d32/f264.d(8): Error: 'a += b' is not a scalar, it is a Typedef!(int, 0)
/d32/f264.d(8): Error: 'a' is not of arithmetic type, it is a Typedef!(int, 0)
/d32/f264.d(8): Error: 'b' is not of arithmetic type, it is a Typedef!(int, 0)
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list