diff --git a/pkg/service/features/app.feature b/pkg/service/features/app.feature index 0ef34e7..2b60f65 100644 --- a/pkg/service/features/app.feature +++ b/pkg/service/features/app.feature @@ -131,4 +131,33 @@ this->doSomethingElse(); } void device::doSomethingElse() { } +``` + + Сценарий: Структура с изменением свойства + * Исходник: +``` +package test + +type device struct { + x int + y int +} + +func (d *device) doSomething() { + d.x = 1 + d.x = d.y +} +``` + * Результат: +``` +class device { +public: + int x; + int y; + void doSomething(); +}; +void device::doSomething() { +this->x=1; +this->x=this->y; +} ```