[TIMOB-13116] Fixed a bug in toString in declare