What is the type of a class object?


class C() {
  class object {
  fun create() = C()

val x = C

What would be the type declaration without using val or var for x variable?


This is the type of an anonymous object, it can't be denoted in the language. If you want to pass a class object somewhere as a parameter, you need to make it implement some trait or inherit from some class. Otherwise it makes no sense to pass it.