http://d.puremagic.com/issues/show_bug.cgi?id=10953
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #1 from Kenji Hara <[email protected]> 2013-09-02 21:45:07 PDT --- (In reply to comment #0) > Kenji reports: > > class Foo > { > void func() nothrow pure @safe > in {} out {} body {} > } > > class Bar : Foo > { > override void func() // inherits attributes of Foo.func > in {} out {} body {} > } > > > Bar.func reports "cannot call xxx function" error. > The reason is the two calls of findVtblIndex in FuncDeclaration::semantic. It > would modify the type field if a derived method inherits the attributes of its > base method (This is documented behavior. Read > http://dlang.org/function#virtual-functions if you interest). But it is not > reflected to the local variable TypeFunction *f > > See also https://github.com/D-Programming-Language/dmd/pull/2516 The bug occurs when -profile switch is specified. Compiler fix: https://github.com/D-Programming-Language/dmd/pull/2521 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
