Bug 14549 – isVirtualMethod does not work well with Github DMD

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-05T18:19:00Z
Last change time
2015-06-17T21:05:08Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
puneet

Comments

Comment #0 by puneet — 2015-05-05T18:19:53Z
string foo(T)() { static if(T.tupleof.length >= 0) return ""; } class frop{ mixin(foo!(typeof(this))); static if(__traits(compiles, undefined)) { } else int bar = 0; static if(! __traits(isVirtualMethod, this.bar)) { } } $ dmd test.d test.d(10): Error: no property 'bar' for type 'test.frop'
Comment #1 by k.hara.pg — 2015-05-06T12:56:57Z
Comment #2 by puneet — 2015-05-11T05:59:17Z
(In reply to Kenji Hara from comment #1) > https://github.com/D-Programming-Language/dmd/pull/4635 Sorry for checking this late. This PR causes another regression for me. I will file it in a couple of hours.
Comment #3 by puneet — 2015-05-11T15:45:40Z
Reduced code. With the PR applied, I get dmd assertion failure: $ dmd /tmp/test.d dmd: attrib.c:1219: virtual Dsymbols* StaticIfDeclaration::include(Scope*, ScopeDsymbol*): Assertion `scope' failed. Aborted //// test.d template foo() { mixin(foo!(typeof(this))); } template foo(T) { enum string foo = q{static if(! __traits(isVirtualMethod, "boo")) {}} ; } class bar { mixin foo; int boo; }
Comment #4 by k.hara.pg — 2015-05-12T16:07:30Z
(In reply to Puneet Goel from comment #3) > Reduced code. With the PR applied, I get dmd assertion failure: > Thanks. I'm working for the regression case on that PR.
Comment #5 by github-bugzilla — 2015-05-13T21:38:19Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a0791d5236be84fa085da2d54e8b1f3e14123e26 fix Issue 14549 - isVirtualMethod does not work well with Github DMD https://github.com/D-Programming-Language/dmd/commit/5ae249a6737e2bd048eeef3b4897464b567b3408 Merge pull request #4635 from 9rnsr/fix14549 Issue 14549 - isVirtualMethod does not work well with Github DMD
Comment #6 by github-bugzilla — 2015-06-17T21:05:08Z