For C++, one kind of nonsensical types is abominable function types, which are bare functions with cv-qualifiers [1] [2].
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p017...
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p017...
I'm not saying that C++'s type system is great. I'm just saying that Java's problem mystifies me.