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






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





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





Fixed DMD 1.00


-- 
Jan 03 2007