www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 777] New: -inline: assert() with a non-constant message causes code to not compile

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=777

           Summary: -inline: assert() with a non-constant message causes
                    code to not compile
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic, rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


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.


-- 
Dec 30 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=777





------- Comment #1 from deewiant gmail.com  2006-12-30 08:46 -------
If compiling with -inline, that is. Otherwise, it works fine.


-- 
Dec 30 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=777


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All




------- Comment #2 from thomas-dloop kuehne.cn  2006-12-31 05:12 -------
Added to DStress as
http://dstress.kuehne.cn/run/a/assert_18_A.d
http://dstress.kuehne.cn/run/a/assert_18_B.d
http://dstress.kuehne.cn/run/a/assert_18_C.d
http://dstress.kuehne.cn/run/a/assert_18_D.d


-- 
Dec 31 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=777


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla digitalmars.com  2007-01-03 22:55 -------
Fixed DMD 1.00


-- 
Jan 03 2007