/trunk/Examples/test-suite/octave/nondynamic_runme.m
MATLAB | 36 lines | 27 code | 9 blank | 0 comment | 4 complexity | c603b63d164d603d6508a99fc3b525c6 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- nondynamic
- aa = nondynamic.A();
- aa.a = 1;
- aa.b = 2;
- try
- aa.c = 2;
- err = 0;
- catch
- err = 1;
- end_try_catch
- if (!err)
- error("A is not static")
- endif
- B=@() subclass(nondynamic.A(),'c',4);
- bb = B();
- bb.c = 3;
- try
- bb.d = 2
- err = 0
- catch
- err = 1
- end_try_catch
- if (!err)
- error("B is not static")
- endif
-
- cc = nondynamic.C();
- cc.d = 3;