2020-01-15 22:34:57 +01:00
|
|
|
nop90: 29/30 points
|
2020-01-15 22:18:07 +01:00
|
|
|
|
2020-01-15 22:34:57 +01:00
|
|
|
Comments:
|
|
|
|
I found that the following tasks were not implemented correctly or contained errors.
|
2020-01-15 22:32:25 +01:00
|
|
|
|
2020-01-15 22:34:57 +01:00
|
|
|
* Null pointers check doesn't work for methods:
|
|
|
|
"
|
|
|
|
class Main {
|
|
|
|
void main() {
|
|
|
|
A a;
|
|
|
|
a.m();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class A {
|
|
|
|
void m() { }
|
|
|
|
}
|
|
|
|
"
|
|
|
|
* Side effects
|
|
|
|
If methods have side effects, then the execution order matters:
|
|
|
|
"
|
|
|
|
class Main {
|
|
|
|
void main() {
|
|
|
|
write(m1() + m2());
|
|
|
|
writeln();
|
|
|
|
}
|
|
|
|
|
|
|
|
int m1() {
|
|
|
|
write(1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int m2() {
|
|
|
|
write(2);
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
"
|
|
|
|
* Can't compile programs which use many registers
|
2020-01-15 22:18:07 +01:00
|
|
|
|