There are several code examples which are compiled in AX not in the way one can expect. For example, call to any method on the Object class or Common class will be successfully compiled despite the fact that such method does not exist on the mentioned class. There is also special case in the other way around. It is regarding "element" object in the forms and reports. Element object is of type SysSetupFormRun (for forms) and SysReportRun (for reports), but they will contain all the methods created on the form or report and will allow to compile calls to them (not any method will be allowed in this case).
Do you know any other examples of such compiler special cases?