Перенос страниц

This commit is contained in:
Alexander Zhirov 2023-03-05 15:30:34 +03:00
parent 4d57446057
commit 4c954c9186
129 changed files with 14 additions and 15 deletions

View file

@ -0,0 +1,23 @@
class Outer
{
int x;
class Inner
{
int y;
this()
{
x = 42;
// x то же, что this.outer.x
assert(this.outer.x == 42);
}
}
}
unittest
{
auto outer = new Outer;
auto inner = outer.new Inner;
assert(outer.x == 42); // Вло­жен­ный объ­ект inner из­ме­нил внеш­ний объ­ект outer
}