Files
kotlin-fork/core/descriptors.jvm
Alexander Udalov ac6be2edba Treat class files with no bytecode version as having the current version
This has no effect currently because all class files produced by Kotlin
have the bytecode version in the metadata (currently 1.0.3).

However, this change will allow us to stop writing bytecode version to
metadata in Kotlin 1.5. In fact, we could do it while the default here
was INVALID_VERSION too, but then for example compiling with Kotlin 1.3
against binaries of version 1.5 would lead to extraneous "incompatible
bytecode version" errors (because INVALID_VERSION is basically 0, which
is incompatible to 1.0.3+), in addition to the correct "incompatible
metadata version" error.

The reason why we might want to avoid writing bytecode version is the
fact that the initial use case it was added for is already supported by
the metadata version, and the bytecode version error reporting was never
fully implemented. Actually bytecode version was almost unused because
of that.
2020-03-10 12:07:39 +01:00
..