fix issue 10646 - [ICE] when casting dynamic array/static array to class
reference
Merge pull request #2348 from hpohl/10646

fix issue 10646 - [ICE] when casting dynamic array/static array to class reference