I'm expecting a ByRef Argument Type Mismatch at compile time but I'm not getting it. It's compiling without errors and failing at runtime with error 13, "Type mismatch".
It's a fairly simple to reproduce.
dim c as Car
Set c = New Car
Sail c
...
Public Sub Sail(ByRef b As Boat)
...
End Sub
Car does not inherit from Boat
Is there a setting (or plugin perhaps) that will force VB into a strict compilation mode?
Edit: it looks like there's no compiler option for this. Does anyone know of an addon that analyses the source for these casting issues during a compile?