[T3250] [FIX] Prevent check for ret type before ret is defined

Merged Facundo Barral requested to merge T3250 into 15.0

Merge request reports