// "Create function 'plus' from usage" "true" class A(val n: T) { fun plus(): A = throw Exception() fun plus(arg: T): A { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } fun test() { val a: A = A(1) + 2 }