D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8032 - `mixin template` before virtual method with same method causes an error
Summary: `mixin template` before virtual method with same method causes an error
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2012-05-04 05:04 UTC by Denis Shelomovskii
Modified: 2012-05-10 11:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2012-05-04 05:04:08 UTC
This doesn't compile if `mixin template` is declared before virtual method `f`:
---
mixin template T() {
    void f() { }
}

class A {
    mixin T; // Named mixin causes the error too
    void f() { }
}

class B : A {
    override void f() { }
}
---
Error: class main.B use of main.A.f() hidden by B is deprecated
Comment 2 github-bugzilla 2012-05-04 11:11:24 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/741b88c6a81320237c0a3cdd312238d0fcb20e9e
fix Issue 8032 - `mixin template` before virtual method with same method causes an error

https://github.com/D-Programming-Language/dmd/commit/b488853f4d3617945851d5d0a2ac20ccb7dab631
Merge pull request #925 from 9rnsr/fix8032

Issue 8032 - `mixin template` before virtual method with same method causes an error
Comment 3 github-bugzilla 2012-05-10 11:16:51 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/634453fc73909ee83d718e884604aa58d76c96ee
fix Issue 8032 test, for order independence