Bug 9952 – regression(HEAD): Attribute inference for virtual functions breaks subclasses

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-17T23:46:00Z
Last change time
2013-04-21T13:53:33Z
Keywords
pull
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2013-04-17T23:46:28Z
Compiles with 2.062, error in git head: import std.stdio; class C(T){ T foo(){ return 2; } } class D : C!int{ override int foo(){ writeln(super.foo()); return 3; } // error } void main(){ } This was presumably introduced by the fix for issue 7511. (It had already been pointed out there that virtual functions shouldn't have their attributes inferred.)
Comment #1 by k.hara.pg — 2013-04-19T23:03:37Z
Comment #2 by github-bugzilla — 2013-04-21T03:26:18Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b8acdd2cc7a66cd9d9e6ad8c2aeb0f12e742d74e fix Issue 9952 - Attribute inference for virtual functions breaks subclasses https://github.com/D-Programming-Language/dmd/commit/808802a45a85450bb9758b295b1ed8a68c0c073c Merge pull request #1915 from 9rnsr/fix9952 [REG2.062] Issue 9952 - Attribute inference for virtual functions breaks subclasses