www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1851] New: missing opCall? when cast away const struct

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

           Summary: missing opCall? when cast away const struct
           Product: D
           Version: 2.010
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: someanon yahoo.com


missing opCall? when cast away const struct

==================================
$ cat conststruct.d

struct S {
  int i;
}

int main() {
  S s;
  const(S) cs = s;
  S s1 = cs;
  S s2 = cast(S)cs;

  return 0;
}
==================================
$ dmd.exe conststruct.d
conststruct.d(9): Error: no property 'opCall' for type 'S'
conststruct.d(9): Error: function expected before (), not 1 of type int
conststruct.d(9): Error: cannot implicitly convert expression (1(cs)) of type
in
t to S
conststruct.d(10): Error: no property 'opCall' for type 'S'
conststruct.d(10): Error: function expected before (), not 1 of type int
conststruct.d(10): Error: no property 'opCall' for type 'S'
conststruct.d(10): Error: function expected before (), not 1 of type int
conststruct.d(10): Error: cannot implicitly convert expression (1(1(cs))) of
typ
e int to S

==================================


-- 
Feb 18 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1851


bugzilla digitalmars.com changed:

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





Fixed dmd 2.012


-- 
Mar 06 2008