Bug 10790 – Cannot use format in pure functions

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-10T15:55:00Z
Last change time
2013-08-10T15:57:23Z
Assigned to
nobody
Creator
temtaime

Comments

Comment #0 by temtaime — 2013-08-10T15:55:54Z
pure int foo() { mixin(format(`return 1;`)); } Error: pure function 'foo' cannot call impure function 'format'
Comment #1 by andrej.mitrovich — 2013-08-10T15:57:23Z
Already fixed in git-head with another bug report. Someone should mark this as a dupe of another report, I can't remember which one it is.