summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/spill/Chapter23Test-testAndPtr.smp
blob: a1e4e9abffc2e4a2547658e3e5850d3e328b8870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{i32 i64 u32 -> u32} write="C";
val _p={u8[~] str -> i64 ptr=str; return write(1,ptr,str#);};
struct _S { !_S? !fld; new _S={ !_S? f -> fld=f; }; };

val ptr = arg == 1 ? null : new _S(arg==1 ? null : new _S(null));
if( ptr && ptr.fld ) {
  _p("true");
} else {
  _p("false");
}

return 0;