source: tests/bugs/238.cfa @ dfe8f78

Last change on this file since dfe8f78 was dfe8f78, checked in by Andrew Beach <ajbeach@…>, 3 months ago

Getting the reproduction of every trac ticket in the repository looks to be a bit much, but here is the other critical ticket and another one I did quickly.

  • Property mode set to 100644
File size: 528 bytes
Line 
1// Trac ticket
2// https://cforall.uwaterloo.ca/trac/ticket/238
3
4#include <stdlib.hfa>
5#include <fstream.hfa>
6
7struct cluster {};
8void ?{}(cluster & this) { sout | "Cluster Ctor"; }
9void ?{}(cluster & this, cluster ) { sout | "Cluster CopyCtor"; }
10
11struct inner {
12        cluster * cl;
13};
14void ?{}(inner & this, cluster & ) { sout | "Inner Ctor"; }
15
16struct outer {
17        inner * in;
18};
19void ?{}(outer & this, cluster & cl ) {
20        this.in = new(cl);
21}
22void ^?{}(outer & this) { delete(this.in); }
23
24int main() {
25        cluster cl;
26        outer o = { cl };
27}
Note: See TracBrowser for help on using the repository browser.