D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6294 - Function overrides not checking for @property
Summary: Function overrides not checking for @property
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 05:15 UTC by Michel Fortin
Modified: 2024-12-13 17:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michel Fortin 2011-07-12 05:15:14 UTC
When you override a function, the compiler should issue an error if there is a mismatch about @property.

class A {
	int foo();
	@property int bar();
}
class B : A {
	@property override int foo();
	override int bar();
}

The code above emits no error, but both overrides have a mismatch with their overriden counterpart regarding @property.
Comment 1 Infiltrator 2014-03-19 18:56:15 UTC
This now correctly does not compile, but the error messages could be improved:

/d519/f363.o:(.rodata+0x48): undefined reference to `_D4f3631A3fooMFZi' /d519/f363.o:(.rodata+0x50): undefined reference to `_D4f3631A3barMFNdZi' /d519/f363.o:(.rodata+0xa8): undefined reference to `_D4f3631B3fooMFNdZi' /d519/f363.o:(.rodata+0xb0): undefined reference to `_D4f3631B3barMFZi' collect2: error: ld returned 1 exit status --- errorlevel 1
Comment 2 dlangBugzillaToGithub 2024-12-13 17:55:47 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18354

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB