www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11896] New: isVirtualMethod related GitHub HEAD regression (works with 2.064)

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

           Summary: isVirtualMethod related GitHub HEAD regression (works
                    with 2.064)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: puneet coverify.org


--- Comment #0 from Puneet Goel <puneet coverify.org> 2014-01-10 09:14:05 PST
---
Here is the reduced testcase. With the GitHub HEAD DMD I get:

$ dmd -c test.d
test.d(8): Error: function test.foo!int.foo.bar () is not callable using
argument types (foo!int)
test.d(12): Error: template instance test.foo!int error instantiating


// File test.d
class foo(T = int) {
  static if(! __traits(isVirtualMethod, zoo)) {}
  alias foo!(T) foobar;
  static foobar _bar;
  static foobar bar() {return _bar;}
  static void bar(foobar foo) {_bar = foo;}
  static foobar zoo() {
    bar = new foobar;
    return bar;
  }
}
foo!(int) baz;

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 10 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2014-01-12
13:04:53 PST ---
Reduced test case:

class foo(T = int) {
  static if(! __traits(isVirtualMethod, zoo)) {}

  static void bar();
  static void bar(foo foo);

  static void zoo() {
    bar(new foo);
  }
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 12 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2014-01-12
13:06:46 PST ---
The issue revolves around traits doing a forward reference of zoo().

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 12 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|isVirtualMethod related     |[REG2.066a] isVirtualMethod
                   |GitHub HEAD regression      |related GitHub HEAD
                   |(works with 2.064)          |regression (works with
                   |                            |2.064)


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2014-01-12 17:54:57 PST ---
(In reply to comment #2)
 The issue revolves around traits doing a forward reference of zoo().

It's introduced by fixing issue 10329 https://github.com/D-Programming-Language/dmd/commit/ebae884d9cd3a0c4ebf3c1b129654ba31ee0e73f Merge pull request #2832 from 9rnsr/fix10329 But, the commit does not exist in 2.065 branch, so it is git-head only regression. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #4 from Walter Bright <bugzilla digitalmars.com> 2014-01-12
21:46:54 PST ---
The only problem there is 2.065 is in such a confused state that I'd prefer to
just abandon it and go with 2.066, meaning this needs to be either fixed or
reverted.

Of course, I'd prefer fixing it!

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 12 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid


--- Comment #5 from Kenji Hara <k.hara.pg gmail.com> 2014-01-13 01:13:13 PST ---
https://github.com/D-Programming-Language/dmd/pull/3088

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #6 from github-bugzilla puremagic.com 2014-01-13 02:24:17 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/474a7a2e422c4342d0301d30e21341a7b05e221c
fix Issue 11896 - isVirtualMethod related GitHub HEAD regression (works with
2.064)

https://github.com/D-Programming-Language/dmd/commit/7f69836080025e931ef7c18d9693c3718c42b8bd
Merge pull request #3088 from 9rnsr/fix11896

[REG2.066a] Issue 11896 - isVirtualMethod related GitHub HEAD regression (works
with 2.064)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


Puneet Goel <puneet coverify.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #7 from Puneet Goel <puneet coverify.org> 2014-01-13 04:40:11 PST
---
Another reduced test case.

// test.d
Frop!(int) frop;

mixin template baz() {
  public void bar() {}
}

mixin baz;

class Foo(T) {
  static if(! __traits(isVirtualMethod, zoo)) {}
  static void zoo() {
    bar();
  }
}

class Frop(T): Foo!T {}

void main() {
  frop.zoo();
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #8 from Puneet Goel <puneet coverify.org> 2014-01-15 06:45:01 PST
---
Yet another reduced testcase. This results in breaking my code at runtime since
the constructor is given a skip with GitHub HEAD!

class Bar {}

class Foo(T=Bar) {
  static if(! __traits(isVirtualMethod, foo)) {}
  alias Foo!(T) this_type;
  this() {
    import std.stdio;
    writeln("Call to constructor -- GitHub HEAD skips this");
  }
  static public this_type foo() {
    return new this_type();
  }
}

void main() {
  alias Foo!Bar FooBar;
  FooBar.foo();
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #9 from Kenji Hara <k.hara.pg gmail.com> 2014-01-15 09:14:06 PST ---
https://github.com/D-Programming-Language/dmd/pull/3104

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #10 from Puneet Goel <puneet coverify.org> 2014-01-15 09:41:36 PST
---
(In reply to comment #9)
 https://github.com/D-Programming-Language/dmd/pull/3104

Works for me. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #11 from github-bugzilla puremagic.com 2014-01-15 20:03:10 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a9769a205c47aa5960e78fea4ce26a312a2b6cde
fix Issue 11896 - isVirtualMethod related GitHub HEAD regression (works with
2.064)

https://github.com/D-Programming-Language/dmd/commit/8409d8c25734f9569a687b18f8a4818ee5762775
Merge pull request #3104 from 9rnsr/fix11896

[REG2.065a] Issue 11896 - isVirtualMethod related GitHub HEAD regression (works
with 2.064)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11896



--- Comment #12 from github-bugzilla puremagic.com 2014-01-22 18:18:58 PST ---
Commit pushed to release at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/20c684c15c670882555e530b693dd8529e744060
Merge pull request #3104 from 9rnsr/fix11896

[REG2.065a] Issue 11896 - isVirtualMethod related GitHub HEAD regression (works
with 2.064)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 22 2014