www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - throw and typedef

Here's the code:

# class C {}
# 
# typedef C D;
# 
# void main()
# {
#     throw new D();
# }

Compiling gives the error:

test.d(7): can only throw class objects, not type D
Nov 09 2004