www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14406] New: GIT HEAD ignores forward reference and generates


          Issue ID: 14406
           Summary: GIT HEAD ignores forward reference and generates wrong
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: puneet coverify.org

Reduced test.

// assertion fails -- both bar_obj and foo should be null though
class Foo {}
string str_mixin(T)() {
  alias P = Poo!T;
  return "Bar bar_obj;
  static class Bar {  Foo foo; }";
template Poo(T) {
  static if(T.tupleof.length) {};
class Frop {
void main() {
  Frop simple = new Frop;
  assert(simple.bar_obj.foo is null, "foo is not null");

Apr 04 2015