Error:Kotlin: The following classes have incomplete hierarchies:


#1

Hello,

I am about to set up a little Kotlin maven project that uses Quasar (see this blog about Quasar and Kotlin). I started with this predefined Kotlin Quasar template project on Github which uses Gradle.  I also got it to compile and run using Gradle. What I did next was converting the Gradle project definition file to a Maven pom.xml, which you can see here. However, now the application does not build but prints this compiler error:

Error:Kotlin: The following classes have incomplete hierarchies:
  co.paralleluniverse.strands.channels.SendPort, unresolved: [AutoCloseable]
  co.paralleluniverse.strands.channels.ReceivePort, unresolved: [AutoCloseable]

This happens when starting the test case in WilcoTest.kt. Searching the Internet for the error message brought some issues which were different than my case. So this was not of much help. Maybe someone could give me a hint what the problem is.

Thanks, Oliver


#2

AutoClosable is a part of Java 7: you need to use Java 7+ . I can compile your project with JDK8 with no errors:

Wilco.kt git:master ❯ mvn --version                                                                           ✭ Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T20:29:23+03:00) Maven home: /usr/java/maven Java version: 1.8.0_51, vendor: Oracle Corporation Java home: /usr/java/jdk1.8.0_51/jre Default locale: ru_RU, platform encoding: UTF-8 OS name: "linux", version: "3.16.7-21-desktop", arch: "amd64", family: "unix" Wilco.kt git:master ❯ mvn test-compile | tail                                                                   ✭ /home/cy/projects/Wilco.kt/target/test-classes/org/objectscape/wilco/WilcoTest$testForAndWhileGoNested$2.class Sources: /home/cy/projects/Wilco.kt/src/test/kotlin/org/objectscape/wilco/WilcoTest.kt [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.883 s [INFO] Finished at: 2015-08-03T20:22:21+03:00 [INFO] Final Memory: 46M/1261M [INFO] ------------------------------------------------------------------------ Wilco.kt git:master ❯


#3

Thanks, Sergey. This did it.