https://kotlinlang.org logo
#kontributors
Title
# kontributors
t

Timo Obereder

10/11/2018, 10:58 AM
Hi everyone, trying myself on my first PR on Kotlin…i’m having trouble testing my code where the idea triggers some errors running a generated test class (IntentionTestGenerated) .….as it seems i guess i shouldn’t fiddle around in the module settings…anyone ran into a similar problem?
Copy code
/Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Arrays.kt
Error:(66, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
Error:(74, 12) Kotlin: [kotlin-stdlib_main] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
Error:(115, 12) Kotlin: [kotlin-stdlib_main] Declaration annotated with '@OptionalExpectation' can only be used in common module sources
/Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Collections.kt
Error:(206, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
/Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/collections/Maps.kt
Error:(175, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
/Users/timoobereder/Documents/Projects/kotlin/libraries/stdlib/src/kotlin/text/Strings.kt
Error:(283, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
Error:(294, 72) Kotlin: [kotlin-stdlib_main] Type parameter cannot have any other bounds if it's bounded by another type parameter
i’m on mac osx
m

mglukhikh

10/11/2018, 12:47 PM
Just as a guess: check you run test using Gradle runner
t

Timo Obereder

10/11/2018, 1:01 PM
nevermind, solved it. never stop starring at java sdk env variables, even with minor version numbers…but that brings me back to the previous error i was getting.
Copy code
Cannot start compiler: the SDK is not specified for modules
"kotlin-stdlib-common_test",
"kotlin-stdlib-common_main",
"kotlin-test-common_main",
"kotlin-test-common_test",
"kotlin-test-annotations-common_main".
Specify the SDK in the Project Structure dialog.
@mglukhikh you told me before, setting those sdk for certain modules should not be done…
m

mglukhikh

10/11/2018, 1:03 PM
t

Timo Obereder

10/11/2018, 1:06 PM
yes, i set the env variables
m

mglukhikh

10/11/2018, 1:19 PM
Try to run
gradlew dist
before running tests
t

Timo Obereder

10/11/2018, 1:24 PM
nope, not working
m

mglukhikh

10/11/2018, 1:37 PM
Ok, try to run
Copy code
gradlew :idea:test --tests "org.jetbrains.kotlin.idea.intentions.IntentionTestGenerated"
just from command line
t

Timo Obereder

10/11/2018, 1:48 PM
ah, nice…it runs…but lots of failing tests…not sure if this is just the result from the few lines of code i’ve changed 🙂 …thanks @mglukhikh ….gonna try and finish this pr now
3 Views