Kotlin / kotlin-koans

Kotlin workshop
MIT License
2.6k stars 1.41k forks source link

Compilation error with current master #131

Open doridori opened 6 years ago

doridori commented 6 years ago

Seen in IDEA 15.0.6.

Builds fine via gradlew in zsh

Information:Kotlin: Kotlin JPS plugin version 1.0.1-release-IJ143-40
Information:Kotlin: Plugin loaded: KotlinAndroidJpsPlugin
Information:Kotlin: Using kotlin-home = /Applications/IntelliJ IDEA 15 CE.app/Contents/plugins/Kotlin/kotlinc
Information:Kotlin: Falling  back to compilation without daemon due to error: [daemon client] java.lang.Exception: Unable to get response from daemon in 10000 ms
Information:Kotlin: Kotlin Compiler version 1.0.1-2
Information:Module "kotlin-koans" was fully rebuilt due to project configuration/dependencies changes
Information:18/01/2018, 15:53 - Compilation completed with 5 errors and 0 warnings in 17s 621ms
../kotlin-koans/src/i_introduction/_8_Smart_Casts/n08SmartCasts.kt
Error:(9, 29) Kotlin: Cannot access '<init>': it is 'private' in 'Expr'
Error:(9, 29) Kotlin: This type is sealed, so it can be inherited by only its own nested classes or objects
Error:(10, 46) Kotlin: Cannot access '<init>': it is 'private' in 'Expr'
Error:(10, 46) Kotlin: This type is sealed, so it can be inherited by only its own nested classes or objects
Error:(13, 9) Kotlin: when expression must be exhaustive, add necessary 'else' branch
../kotlin-koans/src/i_introduction/_8_Smart_Casts/n08SmartCasts.kt
cleverlight commented 6 years ago

IntelliJ IDEA 2016.2.5 Build #IU-162.2228.15, built on October 14, 2016 JRE: 1.8.0_112-release-287-b2 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I encountered the same error, but once I upgraded the Kotlin plugin in IDEA, the 5 errors went away.