Override/Implement: Use function body template when generating functions with default body

#KT-11807 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-18 16:33:17 +03:00
parent df07554764
commit 1635018fe7
60 changed files with 165 additions and 116 deletions
@@ -8,6 +8,6 @@ enum class E : T<Int> {
A, B, C;
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -8,6 +8,6 @@ enum class E : T<Int> {
A, B, C;
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -8,7 +8,7 @@ enum class E : T<Int> {
A, B, C;
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
val bar = 1
@@ -3,15 +3,15 @@
enum class E {
A {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}, B {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}, C {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
};
@@ -3,15 +3,15 @@
enum class E(n: Int) {
A(1) {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}, B(2) {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}, C(3) {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
};
@@ -6,14 +6,14 @@ interface T<X> {
class U : T<String> {
override fun foo(x: String): String {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
class V : T<Int> {
override fun foo(x: Int): Int {
throw UnsupportedOperationException()
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}