www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9436] New: enum cannot be forward referenced with cyclic imports and mixin

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

           Summary: enum cannot be forward referenced with cyclic imports
                    and mixin
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de



PST ---
With dmd from github, this causes an error (reduced by dustmite):

///////////
module aggr;
import type;

class Aggregate : Type
{
}

class Class {
}


///////////
module interpret;
import type;
import aggr;

class ReferenceValueT(T)
{
    void doCast()
    {
        auto x = Type.ConversionFlags.kAllowBaseClass;
    }
}

class ClassValue : ReferenceValueT!Class
{
}

//////////
module node;
import aggr;
template ForwardCtor()
{
}

//////////
module type;

import node;

class Type {

    mixin ForwardCtor!();


    enum ConversionFlags
    {
        kAllowBaseClass          = 0
    }
}

dmd -c interpret.d
type.d(12): Error: enum type.Type.ConversionFlags is forward referenced when loo king for 'kAllowBaseClass' interpret.d(9): Error: no property 'kAllowBaseClass' for type 'int' This used to compile until a couple of days ago. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 01 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9436


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 01 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9436




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

https://github.com/D-Programming-Language/dmd/commit/ff9b7b4add6405a58c1410ac5b1bad2299c64456
fix Issue 9436 - enum cannot be forward referenced with cyclic imports and
mixin

https://github.com/D-Programming-Language/dmd/commit/520b8703f8c8a5b8b477cefe3c7293e3f6271888


Issue 9436 - enum cannot be forward referenced with cyclic imports and mixin

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9436


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2013