Bug 777 – -inline: assert() with a non-constant message causes code to not compile

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2006-12-30T08:44:00Z
Last change time
2014-02-15T13:21:46Z
Keywords
diagnostic, rejects-valid
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2006-12-30T08:44:49Z
void main(char[][] args) { foo(); } void foo() { char[] bar; assert (true, bar ~ "foo"); } Errors with "function asdf.foo is a nested function and cannot be accessed from main" - on line 7 instead of 2, if the error itself weren't bad enough.
Comment #1 by matti.niemenmaa+dbugzilla — 2006-12-30T08:46:32Z
If compiling with -inline, that is. Otherwise, it works fine.
Comment #2 by thomas-dloop — 2006-12-31T05:12:14Z
Comment #3 by bugzilla — 2007-01-03T22:55:32Z
Fixed DMD 1.00