```object M { class C (val x: Int, val y: Int ...
# getting-started
r
Copy code
object M {
    class C (val x: Int, val y: Int = 5)
}

class N(val x: Int, val y: Int = 5)

fun main(args: Array<String>) {
    val p = N(3)
    val q = (M::C)(3)
}
Why is there a syntax error in the val q = line ?
l
the correct syntax for that line, would be
val q = M.C(3)
As to why, I assume that the
(a)(b)
syntax, means that you are trying to cast
b
to
a
. Not sure about that though 🙂