Bug 12298 – Templates can be used in mixin even when not declared as mixin template

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-04T11:23:04Z
Last change time
2024-12-13T18:17:47Z
Keywords
pull
Assigned to
No Owner
Creator
Jesse Phillips
Moved to GitHub: dmd#18787 →

Comments

Comment #0 by Jesse.K.Phillips+D — 2014-03-04T11:23:04Z
The below code shows that a normal template can still be used within a mixin statement. If this is still desired it should be stated in the documentation. template Foo() { enum x = 5; } mixin Foo; static assert(x == 5);
Comment #1 by greensunny12 — 2016-06-05T12:12:32Z
Yes please let this throw an error. See also: https://issues.dlang.org/show_bug.cgi?id=16025
Comment #2 by razvan.nitu1305 — 2022-12-22T11:21:35Z
*** Issue 16025 has been marked as a duplicate of this issue. ***
Comment #3 by dlang-bot — 2022-12-22T12:02:26Z
@RazvanN7 created dlang/dlang.org pull request #3479 "Fix Issue 12298 - Templates can be used in mixin even when not declared as mixin template" fixing this issue: - Fix Issue 12298 - Templates can be used in mixin even when not declared as mixin template https://github.com/dlang/dlang.org/pull/3479
Comment #4 by robert.schadek — 2024-12-13T18:17:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18787 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB