Thread overview | |||||
---|---|---|---|---|---|
|
October 16, 2003 BUG enum | ||||
---|---|---|---|---|
| ||||
enum A {a,b,c} void main() { A m = c; } This cannot compile. Compiler complaints that C isn't defined. |
October 16, 2003 Re: BUG enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to tintor |
On Thu, 16 Oct 2003 15:38:57 +0000 (UTC), tintor
<tintor_member@pathlink.com> wrote:
>enum A {a,b,c}
>
>void main()
>{
>A m = c;
>}
>
>This cannot compile.
>Compiler complaints that C isn't defined.
>
Use "A.c" instead of just "c".
--Benji
|
October 16, 2003 Re: BUG enum | ||||
---|---|---|---|---|
| ||||
Posted in reply to tintor | In article <bmme2h$l26$1@digitaldaemon.com>, tintor says... > >enum A {a,b,c} > >void main() >{ >A m = c; >} > >This cannot compile. >Compiler complaints that C isn't defined. Try this. enum A {a,b,c} void main() { A m = A.c; } |
Copyright © 1999-2021 by the D Language Foundation