I have a standard Kotlin project in IntelliJ (i.e....
# intellij
i
I have a standard Kotlin project in IntelliJ (i.e. not Gradle). Compiler target is set to 1.8, but when I Show Kotlin Bytecode it shows "class version 50.0 (50)". Shouldn't it be 52?
compiler.xml:
Copy code
<bytecodeTargetLevel target="1.8">
  <module name="my-module_main" target="1.8" />
  <module name="my-module_test" target="1.8" />
</bytecodeTargetLevel>
Hmm, well, same major version 50 for a Gradle project with:
Copy code
compileKotlin {
  kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
  kotlinOptions.jvmTarget = "1.8"
}
a
what version of kotlin are you using?
i
1.2.21
IntelliJ IDEA 2017.3.4 (Ultimate Edition) Build #IU-173.4548.28, built on January 29, 2018 JRE: 1.8.0_152-release-1024-b11 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6
Running
javap -p
from Terminal on the class file shows major version 52. Must be something with the Kotlin Bytecode view.
c
Is project SDK set to JDK 1.8?
i
It is:
Copy code
<project version="4">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/out" />
  </component>
</project>
✔️ 1