5554 – [qtd] Covariance detection failure

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5554 - [qtd] Covariance detection failure
Summary: [qtd] Covariance detection failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: yebblies
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
Reported: 2011年02月09日 01:44 UTC by Max Samukha
Modified: 2012年02月20日 23:09 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Max Samukha 2011年02月09日 01:44:07 UTC
class MA
{
}
class MB : MA
{
}
class MC : MB
{
}
class A
{ 
 MA foo() { return null; }
}
interface I
{
 MB foo();
}
class B : A
{ 
 override MC foo() { return null; }
}
class C : B, I
{ 
 override MC foo() { return null; }
}
void main()
{
}
----
Error: function test.C.foo incompatible covariant types MA() and MB()
Comment 1 yebblies 2012年02月20日 03:18:50 UTC
https://github.com/D-Programming-Language/dmd/pull/746 
Comment 2 github-bugzilla 2012年02月20日 22:06:00 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/027fdbc892d7d2bd89e1d1b88accb53ca733f8de
Merge pull request #746 from yebblies/issue5554
Issue 5554 - [qtd] Covariance detection failure
Comment 3 github-bugzilla 2012年02月20日 23:09:07 UTC
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/0c46d6921050907fe413244cbe71cfa7b93135a2
fix Issue 5554 - [qtd] Covariance detection failure


AltStyle によって変換されたページ (->オリジナル) /