digitalmars.D.bugs - dmd.120 bug.. compiler error with switch default statments when an
- dickl (26/26) Apr 08 2005 The following gives a compiler error message
- Thomas Kuehne (13/39) Apr 08 2005 -----BEGIN PGP SIGNED MESSAGE-----
- Walter (3/5) Apr 09 2005 Fixed. Thanks, -Walter
The following gives a compiler error message
test.d(23): switch statement already has a default
The error goes away if class T is not an auto class or the destructor is
removed.
The compiler still complains about the default case even if the default
case is removed from the switch statement.
This wasn't a problem until .120.
==================================
auto class T
{
public:
this(){}
~this(){}
}
int main()
{
auto T t=new T();
int i=1;
switch(i)
{
case 1:
break;
default:
break;
}
}
Apr 08 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
dickl schrieb am Fri, 08 Apr 2005 13:51:27 -0400:
The following gives a compiler error message
test.d(23): switch statement already has a default
The error goes away if class T is not an auto class or the destructor is
removed.
The compiler still complains about the default case even if the default
case is removed from the switch statement.
This wasn't a problem until .120.
==================================
auto class T
{
public:
this(){}
~this(){}
}
int main()
{
auto T t=new T();
int i=1;
switch(i)
{
case 1:
break;
default:
break;
}
}
Added to DStess as
http://dstress.kuehne.cn/run/switch_19.d
http://dstress.kuehne.cn/run/switch_20.d
http://dstress.kuehne.cn/run/switch_21.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFCVtoX3w+/yD4P9tIRAof9AJ9OVx1l79us4WPG0FICSJB8WjMkrQCgi++6
kvCNaGgMULWO0Aj+wrVNaUQ=
=2MAo
-----END PGP SIGNATURE-----
Apr 08 2005
"dickl" <dick221z yahoo.com> wrote in message news:d36gav$31fo$1 digitaldaemon.com...The following gives a compiler error message test.d(23): switch statement already has a defaultFixed. Thanks, -Walter
Apr 09 2005









Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> 