September 27, 2005 compiler crash on template | ||||
---|---|---|---|---|
| ||||
For some reason my last posting of this message isn't showing up.... // begin code class Foo(T) { void add( T val ) { uint test = 1; if ( test > val ) return; } } struct MyStruct { int value; } void main( char[][] args ) { Foo!(MyStruct) foo = new Foo!(MyStruct); } (DMD 0.131, Windows XP Pro) I get the 'dmd.exe has encountered a problem and needs to close' .. gp fault. ---------- Capture Output ---------- > "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\error.d" E:\proj\temp\error.d(6): incompatible types for ((test) > (val)): 'uint' and 'MyStruct' > Terminated with exit code -1073741819. |
September 27, 2005 Re: compiler crash on template | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Medlock Attachments: | David Medlock schrieb: > For some reason my last posting of this message isn't showing up.... > > // begin code > > class Foo(T) > { > void add( T val ) > { > uint test = 1; > if ( test > val ) return; > } > } > > struct MyStruct > { > int value; > } > > void main( char[][] args ) > { > Foo!(MyStruct) foo = new Foo!(MyStruct); > } > > > > (DMD 0.131, Windows XP Pro) > > I get the 'dmd.exe has encountered a problem and needs to close' .. gp fault. > ---------- Capture Output ---------- >> "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\error.d" > E:\proj\temp\error.d(6): incompatible types for ((test) > (val)): 'uint' > and 'MyStruct' >> Terminated with exit code -1073741819. Added to DStress as http://dstress.kuehne.cn/run/b/bug_expression_5818_A.d http://dstress.kuehne.cn/run/b/bug_expression_5818_B.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_C.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_D.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_E.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_F.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_G.d http://dstress.kuehne.cn/nocompile/b/bug_expression_5818_H.d Thomas |
Copyright © 1999-2021 by the D Language Foundation