А на что ругается? В 4-ке не ругается...
X++:
static void (Args _args)
{
int securitiKeyId;
;
securitiKeyId = new MenuFunction(menuitemdisplaystr(AddressStreet_RU), MenuItemType::Display).securityKey();
info(new DictSecurityKey(securitiKeyId).name());
}