validating return types from anonymous declarations within multiple dereferenced class statements