Mercurial > projects > ldc
annotate tests/mini/bug2.d @ 1647:638a823ace45
Strange workaround for returning from within 'void main()'. The new dmdfe sets the ReturnStatement->exp to null. Fixed bug #391.
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Wed, 10 Mar 2010 19:35:14 -0700 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
27
92408a3a2bac
[svn r31] * Fixed returning through hidden pointer was unable to report back the return value
lindquist
parents:
diff
changeset
|
1 module bug2; |
92408a3a2bac
[svn r31] * Fixed returning through hidden pointer was unable to report back the return value
lindquist
parents:
diff
changeset
|
2 struct Vec { Vec barf() { return Vec(); } } |
92408a3a2bac
[svn r31] * Fixed returning through hidden pointer was unable to report back the return value
lindquist
parents:
diff
changeset
|
3 class test { this(Vec whee) { } } |
92408a3a2bac
[svn r31] * Fixed returning through hidden pointer was unable to report back the return value
lindquist
parents:
diff
changeset
|
4 void main() { Vec whee; new test(whee.barf()); } |