Thread overview | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 01, 2008 DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
New const/invariant/enum in 2.009! http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.025.zip http://www.digitalmars.com/d/changelog.html http://ftp.digitalmars.com/dmd.2.009.zip |
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> New const/invariant/enum in 2.009!
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.025.zip
>
> http://www.digitalmars.com/d/changelog.html
> http://ftp.digitalmars.com/dmd.2.009.zip
Ah ha! A new year surprise!
Happy new year, Walter.
(you are in the same time zone as me).
-JJR
|
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> New const/invariant/enum in 2.009!
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.025.zip
>
> http://www.digitalmars.com/d/changelog.html
> http://ftp.digitalmars.com/dmd.2.009.zip
Nice CTFE fixes, too. Thanks, Walter.
Happy New Year!
Don.
|
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > New const/invariant/enum in 2.009! > > http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.025.zip > > http://www.digitalmars.com/d/changelog.html http://ftp.digitalmars.com/dmd.2.009.zip There is something wrong with linux libphobos2 library. I get linker errors for simplest program: -------------- import std.stdio; void main() { writefln("Just a test!"); } ------------- Version 2.008 works just right. marcin@genesis:~/Programy/D/TestCases/src$ dmd quicktest.d gcc quicktest.o -o quicktest -m32 -Xlinker -L/usr/local/lib -lphobos2 -lpthread -lm quicktest.o: In function `_D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya': quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya+0x27): undefined reference to `_D3std8bitmanip11toStringSfxFmZAya' quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya+0x41): undefined reference to `_D3std8bitmanip11toStringSfxFmZAya' quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya+0xa3): undefined reference to `_D3std8bitmanip11toStringSfxFmZAya' quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya+0xba): undefined reference to `_D3std8bitmanip11toStringSfxFmZAya' quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eTkVyG8aa8_6672616374696f6eVi23Vk0Z15createAccessorsFZAya+0xf8): undefined reference to `_D3std8bitmanip11toStringSfxFmZAya' quicktest.o:quicktest.d (.text._D3std8bitmanip102__T15createAccessorsVAyaa20_6672616374696f6e6578706f6e656e747369676eThVyG8aa8_6578706f6e656e74Vi8Vk23Z15createAccessorsFZAya+0x27): more undefined references to `_D3std8bitmanip11toStringSfxFmZAya' follow collect2: ld returned 1 exit status --- errorlevel 1 -- Regards Marcin Kuszczak (Aarti_pl) ------------------------------------- Ask me why I believe in Jesus - http://www.zapytajmnie.com (en/pl) Doost (port of few Boost libraries) - http://www.dsource.org/projects/doost/ ------------------------------------- |
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > New const/invariant/enum in 2.009! > > http://www.digitalmars.com/d/1.0/changelog.html > http://ftp.digitalmars.com/dmd.1.025.zip > > http://www.digitalmars.com/d/changelog.html > http://ftp.digitalmars.com/dmd.2.009.zip Happy new year, Walter! This update caused a massive breakage to my program and I don't have any idea how to observe the new const/invariant rules. Codes using const class or struct are broken: -------------------------------------------- import std.conv, std.stdio; class C { private int i; this(int i) { this.i = i; } const string toString() { return to!(string)(this.i); } } void main() { const(C) c; c = new C(1); // error writeln(c); } -------------------------------------------- Please help me upgrade to 2.009! Thank you. |
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcin Kuszczak | Marcin Kuszczak wrote:
> There is something wrong with linux libphobos2 library.
I just uploaded it again. I think I inadvertently posted the old one.
|
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to のしいか (noshiika) | のしいか (noshiika) wrote:
Replace:
> const(C) c;
> c = new C(1); // error
with:
const(C) c = new C(1);
|
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound1@digitalmars.com> wrote in message news:fle8mi$1j24$2@digitalmars.com... > ???? (noshiika) wrote: > > Replace: > >> const(C) c; >> c = new C(1); // error > > with: > > const(C) c = new C(1); Solve: const(C) c; if(someCondition) c = new C(1); else c = new C(2); |
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley Attachments: | Jarrett Billingsley wrote: > "Walter Bright" <newshound1@digitalmars.com> wrote in message news:fle8mi$1j24$2@digitalmars.com... >> ???? (noshiika) wrote: >> >> Replace: >> >>> const(C) c; >>> c = new C(1); // error >> with: >> >> const(C) c = new C(1); > > Solve: > > const(C) c; > > if(someCondition) > c = new C(1); > else > c = new C(2); > Untested: const(C) c = (delegate const(C) () { if (someCondition) return new C(1); else return new C(2); })(); Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger@free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger@jabber.fr | +---------------------------------+------------------------------+ |
January 01, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jérôme M. Berger | ""Jérôme M. Berger"" <jeberger@free.fr> wrote in message news:flea9n$1n0r$1@digitalmars.com... > Untested: > > const(C) c = (delegate const(C) () { > if (someCondition) > return new C(1); > else > return new C(2); > })(); I'm crying. |
Copyright © 1999-2021 by the D Language Foundation