Precompile checks: valid typecasting
Currently, we allow any kind of typecasting blindly, relying on target language compiler to assess the validity of the case.

In certain cases, it's completely true — for example, casting generic KaitaiStruct to more specific type can be likely only checked in runtime anyway, if ever.

However, there are clearly some forms of typecasting that are not well-defined. For example:

* casting bytes into string (it's impossible to do so, as it requires encoding)
* casting string into bytes (same thing)
* casting string into integer (same thing + implicitly implies that we'll be operating on first character of string?)
* casting string into float (doesn't really make sense at all)
* casting enum into string (not possible in most languages)

etc, etc.

So it's quite possible to avoid all these problems by doing preventive precompile-time type check for all these.