Add test for reference with incorrect type.