digitalmars.D.bugs - [Issue 3396] New: Call of abstract method not detected by semantic check
- d-bugmail puremagic.com (39/41) Oct 14 2009 http://d.puremagic.com/issues/show_bug.cgi?id=3396
- d-bugmail puremagic.com (17/17) Feb 06 2012 http://d.puremagic.com/issues/show_bug.cgi?id=3396
- d-bugmail puremagic.com (16/18) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=3396
http://d.puremagic.com/issues/show_bug.cgi?id=3396 Summary: Call of abstract method not detected by semantic check Product: D Version: 2.031 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P3 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dfj1esp02 sneakemail.com 02:20:30 PDT --- --- abstract class A { abstract void M(); } class B:A { override void M(){ writeln("B.M"); super.M(); } } int main() { auto b=new B(); b.M(); return 0; } ---dmd -c tmp.d -w -o-dmd -w -run tmp.dOPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. tmp.obj(tmp) Error 42: Symbol Undefined _D3tmp1A1MMFZv --- errorlevel 1 Compilation with -o- passes successfully. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 14 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3396 Created an attachment (id=1072) abstract methods not being flagged as unimplemented I encountered this problem in a library, what I found interesting was that the program compiled and ran without crashing, just had empty output where I was expecting text. Attachment is a simpler test case with similar outcome: $ dmd test.d test.o:(.rodata+0xb0): undefined reference to `_D4test1A2a1MFZAya' collect2: ld returned 1 exit status --- errorlevel 1 $ dmd -c test.d $ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 06 2012
http://d.puremagic.com/issues/show_bug.cgi?id=3396 Stewart Gordon <smjg iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid CC| |smjg iname.comCreated an attachment (id=1072) [details] abstract methods not being flagged as unimplementedAIUI a method declared without the abstract attribute is taken to reference a function defined elsewhere. Since no library or object file that defines such a function has been linked in, the linker errors. The original testcase is different: A.m is declared as abstract, so the compiler should reject the attempt to call it there and then. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012