It's common, especially when porting CLJ code, to forget to make some type nullable. The error is generally only caught at runtime. Here I propose to add a warning every time the compiler can detect a nil check will never be true, this will help spot the error at compile time.
This includes inlines of nil? and some? but also boolean contexts where the type is not bool and which is thus only a nil check (we already have specialized code for that).
It's common, especially when porting CLJ code, to forget to make some type nullable. The error is generally only caught at runtime. Here I propose to add a warning every time the compiler can detect a nil check will never be true, this will help spot the error at compile time.
This includes inlines of
nil?
andsome?
but also boolean contexts where the type is not bool and which is thus only a nil check (we already have specialized code for that).