← Back to index
|
Original Bugzilla link
Bug 14355 – SDC test0107.d compiles but should not
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2015-03-28T16:37:00Z
Last change time
2015-06-09T01:31:17Z
Assigned to
nobody
Creator
shammah.chancellor
Comments
Comment #0
by shammah.chancellor — 2015-03-28T16:37:10Z
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()); ```
Comment #1
by ketmar — 2015-03-28T17:35:00Z
same for this: two different functions with different signatures, so SDC is wrong here.