Do not add explicit visibility modifiers in Override/Implement
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class MyClass<A: Comparable<A>> : Iterable<A> {
|
||||
|
||||
public override fun iterator(): Iterator<A> {
|
||||
override fun iterator(): Iterator<A> {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package foo
|
||||
|
||||
class Impl: B {
|
||||
|
||||
public override fun foo(r: Runnable?) {
|
||||
override fun foo(r: Runnable?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ class C : A(), B {
|
||||
super<A>.internalFun()
|
||||
}
|
||||
override val internalProperty: Int = 0
|
||||
protected override fun protectedFun() {
|
||||
override fun protectedFun() {
|
||||
super<A>.protectedFun()
|
||||
}
|
||||
protected override val protectedProperty: Int = 0
|
||||
public override fun publicFun() {
|
||||
override val protectedProperty: Int = 0
|
||||
override fun publicFun() {
|
||||
super<A>.publicFun()
|
||||
}
|
||||
public override val publicProperty: Int = 0
|
||||
override val publicProperty: Int = 0
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import foo.Intf
|
||||
|
||||
class Impl(): Intf {
|
||||
|
||||
public override fun getFooBar(): String? {
|
||||
override fun getFooBar(): String? {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import foo.Intf
|
||||
|
||||
class Impl(): Intf() {
|
||||
|
||||
protected override fun getFooBar(): String? {
|
||||
override fun getFooBar(): String? {
|
||||
return super<Intf>.getFooBar()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import foo.Intf
|
||||
|
||||
class Impl(): Intf {
|
||||
|
||||
public override fun fooBar(i: Int, s: Array<out String>?, foo: Any?) {
|
||||
override fun fooBar(i: Int, s: Array<out String>?, foo: Any?) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import foo.A
|
||||
|
||||
class C : A() {
|
||||
|
||||
public override fun getAnswer(array: Array<out String>?, number: Int, value: Any?): Int {
|
||||
override fun getAnswer(array: Array<out String>?, number: Int, value: Any?): Int {
|
||||
return super<A>.getAnswer(array, number, value)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package foo
|
||||
|
||||
class Impl: B() {
|
||||
|
||||
public override fun foo(r: Runnable?) {
|
||||
override fun foo(r: Runnable?) {
|
||||
super<B>.foo(r)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ trait Test {
|
||||
|
||||
class SomeTest : Test {
|
||||
val hello = 12
|
||||
public override fun test() {
|
||||
override fun test() {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
protected override val testProp: Int = 0
|
||||
override val testProp: Int = 0
|
||||
|
||||
/**
|
||||
* test
|
||||
|
||||
Reference in New Issue
Block a user