Open
Description
Hi folks! I'm working through the exercises and realised exercise 1 in the Variable Argument Lists atom seems to have no way to pass in IntelliJ IDEA. I need to capture the output of an error and print it to the console. However, the error to be captured is a compile-time error, not a runtime error, so the program can't even run to print its message. If I don't implement anything, then the tests fail. Am I missing something, or is there just no way to make this exercise pass?
I tried all of these solutions and none worked:
Function declared outside main (wouldn't compile)
// Varargs1/Task.kt
package variableArgumentListsExercise1
import atomictest.capture
fun multipleVarargs(vararg a: Int, vararg b: Double) {}
fun main() {
println(capture { multipleVarargs(1, 2, 1.0, 2.0) })
}
Function declared inside main (wouldn't compile)
// Varargs1/Task.kt
package variableArgumentListsExercise1
import atomictest.capture
fun main() {
println(
capture {
fun multipleVarargs(vararg a: Int, vararg b: Int) {}
}
)
}
Nothing implemented (tests failed)
// Varargs1/Task.kt
package variableArgumentListsExercise1
// TODO
fun main() {
// TODO
}
Thanks for your time & help!
Metadata
Metadata
Assignees
Labels
No labels
Activity