Bug 2624 – A string mixin should be allowed wherever a type + storage class is

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-01-27T16:35:58Z
Last change time
2024-12-13T17:49:22Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
See also
https://issues.dlang.org/show_bug.cgi?id=19299
Moved to GitHub: dmd#17881 →

Comments

Comment #0 by andrei — 2009-01-27T16:35:58Z
The following code should compile: mixin("ref int") f() { static int x; return x; } This would allow sidestepping the thorny issue of returning a value or a reference depending on a compile-time condition. Same goes about parameters, e.g. this should work too: void f(mixin("ref int") x) { }
Comment #1 by 2korden — 2009-01-28T03:04:09Z
Do you mean that the following should be allowed, too? class Foo { void bar() mixin("const") { } }
Comment #2 by robert.schadek — 2024-12-13T17:49:22Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17881 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB