[Issue 14355] New: SDC test0107.d compiles but should not
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Mar 28 09:37:10 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14355
Issue ID: 14355
Summary: SDC test0107.d compiles but should not
Product: D
Version: unspecified
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: shammah.chancellor at gmail.com
SDC fails as follows:
```
> ../bin/sdc test0107.d
int foo(int i) { return i; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
test0107.d:12: error: Poisoned
Line 1 expanded from mixin :
mixin(foo());
^~~~~~~~~~~~~
test0107.d line 12
```
while DMD erroneously compiles it.
```test0107.d
//T compiles:no
//T has-passed:yes
int main() {
return 42;
}
string foo() {
return "int foo(int i) { return i; }";
}
mixin(foo());
```
--
More information about the Digitalmars-d-bugs
mailing list