Change hw6 to an unsolved version.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
0c04936ccf
commit
ee01a8f5b2
186 changed files with 9605 additions and 4019 deletions
18
hw6/hw5programs/tc_struct_null_field.oat
Normal file
18
hw6/hw5programs/tc_struct_null_field.oat
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
struct A {
|
||||
int x
|
||||
}
|
||||
|
||||
struct B {
|
||||
A? a /* can be null */
|
||||
}
|
||||
|
||||
int program(int argc, string[] args) {
|
||||
var b = new B{a=A null};
|
||||
b.a = new A{x = 3};
|
||||
if? (A a2 = b.a) {
|
||||
return a2.x;
|
||||
}
|
||||
b.a = A null;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue