Do not add explicit visibility modifiers in Override/Implement

This commit is contained in:
Andrey Breslav
2013-09-05 21:52:56 +04:00
parent a3a5f9015a
commit fa2ea75c09
15 changed files with 47 additions and 29 deletions
@@ -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()
}
}
@@ -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