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


--- Comment #0 from Rainer Schuetze <r.sagitario gmx.de> 2013-02-01 03:03:45
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

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


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-02-01 22:53:56 PST ---
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



--- Comment #2 from github-bugzilla puremagic.com 2013-02-02 12:13:13 PST ---
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
Merge pull request #1594 from 9rnsr/fix9436

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