November 10, 2004 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 |
Copyright © 1999-2021 by the D Language Foundation