www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Harmonia compiler error

reply "Rolf Tollerud" <rolftollerud msn.com> writes:
Cannot build Harmonia and the samples(build.bat), gets the following error 
message with D Compiler v0.125:
harmonia\ui\widgets.d(275): container.descendants(1) is not an lvalue
harmonia\ui\widgets.d(290): container.descendants(1) is not an lvalue
--- errorlevel 1

Regards
Rolf Tollerud
May 30 2005
parent reply "Andrew Fedoniouk" <news terrainformatica.com> writes:
Hi, Rolf,

I've just updated sources in SVN, please download them again.

Problem explanation:

Dmd compiler behaves differently in release mode than in non release.
Following line compiles just fine in Debug and was compiling
fine prior 125 in Release.
It is producing strange error 'descendants(1) is not an lvalue'

foreach(Widget w; descendants(true))
{
.....
}

"Fix" I've made:

DEEP_ENUM de = descendants(true);
foreach(Widget w; de)
{
.....
}

Walter, I have similar pattern in many other places
and only here it produces error.

descendants is a member function returning
DEEP_ENUM structure with opApply method.

Andrew.



"Rolf Tollerud" <rolftollerud msn.com> wrote in message 
news:d7ekba$1iab$1 digitaldaemon.com...
 Cannot build Harmonia and the samples(build.bat), gets the following error 
 message with D Compiler v0.125:
 harmonia\ui\widgets.d(275): container.descendants(1) is not an lvalue
 harmonia\ui\widgets.d(290): container.descendants(1) is not an lvalue
 --- errorlevel 1

 Regards
 Rolf Tollerud

 

May 30 2005
parent reply "Rolf Tollerud" <rolftollerud msn.com> writes:
Hi Andrew,

Now it compiles without a glitch!

Thank You!

Anothe question. Why can not Harmonia be compiled into a ordinari lib, 
"harmonia.lib"?

Regards
Rolf Tollerud
May 30 2005
parent "Andrew Fedoniouk" <news terrainformatica.com> writes:
"Rolf Tollerud" <rolftollerud msn.com> wrote in message 
news:d7g5ta$3ll$1 digitaldaemon.com...
 Hi Andrew,

 Now it compiles without a glitch!

 Thank You!

 Anothe question. Why can not Harmonia be compiled into a ordinari lib, 
 "harmonia.lib"?

For the same reason why it is not possible to use any templates in Phobos in debug mode. I think it is possible to change couple of lines in release.mak to produce lib from it.
 Regards
 Rolf Tollerud


 

May 30 2005