Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/memberCtors.c

    r2afec66 r72f85de  
    2222}
    2323
    24 void ?=?(WrappedInt & this, int x) {
     24/* WrappedInt */ void ?=?(WrappedInt & this, int x) {
    2525  printf("assigning int: %d %d\n", this.x, x);
    2626  this.x = x;
     27  // return this;
    2728}
     29
     30// WrappedInt ?=?(WrappedInt & this, WrappedInt other) {
     31//   printf("assigning int: %d %d\n", this.x, other.x);
     32//   this.x = other.x;
     33//   return this;
     34// }
    2835
    2936struct A {
     
    7986
    8087void ^?{}(B & b) {
     88  printf("begin destruct B\n");
    8189  b.a2 = (A) { 0 };
    8290  ^(b.a1){};
     91  printf("end destruct B\n");
    8392} // a2, a3 never destructed - will be automatically destructed
    8493
    8594int main() {
    8695  printf("Before declaration of b1\n");
    87   B b1;
     96  B b1;  // b1 = { { 1000, 0, 0 }, { 1001, 0, 0 }, { 0, 0, 0 } }
    8897  printf("Before declaration of b2\n");
    8998  B b2 = b1;
Note: See TracChangeset for help on using the changeset viewer.