Bug 24483 – Lack of error report from compiler - not linker one
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-04-04T22:42:08Z
Last change time
2024-04-05T16:17:23Z
Assigned to
No Owner
Creator
apham
Comments
Comment #0 by apz28 — 2024-04-04T22:42:08Z
abstract class A
{
abstract void foo();
}
class B : A
{
final override void foo()
{
super.foo(); // Should report an error on this line
}
}
void main()
{
auto b = new B();
}
Get obscured below error message
./onlineapp.d:10: error: undefined reference to '_D9onlineapp1A3fooMFZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Comment #1 by razvan.nitu1305 — 2024-04-05T08:07:42Z
What compiler version are you using? I'm using 2.107 and I get:
test.d(10): Error: call to unimplemented abstract function `void foo()`
test.d(10): declared here: test.d(3)
Seems it was fixed in: https://github.com/dlang/dmd/pull/15652
Comment #2 by apz28 — 2024-04-05T16:17:23Z
From this website: https://run.dlang.io/?compiler=dmd
with -v option, it has output "version v2.105.3"
Look like it needs and update to latest release