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: nob...@puremagic.com
        ReportedBy: steve.te...@britseyeview.com


--- Comment #0 from Steve Teale <steve.te...@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: -------

Reply via email to