[Issue 6779] New: Error: can only initialize const member xxx inside	constructor - not const, no line number
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Oct  7 07:35:07 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6779
           Summary: Error: can only initialize const member xxx inside
                    constructor - not const, no line number
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: steve.teale at britseyeview.com
--- Comment #0 from Steve Teale <steve.teale at britseyeview.com> 2011-10-07 07:34:21 PDT ---
import mysql;
// The import mysql.d contains only:
/*
extern (C):
struct MYSQL{}
MYSQL* mysql_init(MYSQL* mysql);
*/
// If I put this stuff in-line the error does not happen
struct Connection
{
   MYSQL _mysql;
   ~this()
   {
   }
   this(int dummy = 0)
   {
      mysql_init(&_mysql);
   }
}
// dmd -c mysqld.d
//
// Error: can only initialize const member _mysql inside constructor
// Error: this is not mutable
-- 
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