add trailing newlines to test files

otherwise I have to rollback dozens of files after using sed that follows conventions
This commit is contained in:
Stepan Koltsov
2012-03-12 22:54:14 +04:00
parent 61dc0c265c
commit 07ff53d456
163 changed files with 163 additions and 163 deletions
@@ -42,4 +42,4 @@ trait MyTrait {
var l1: Int = <!PROPERTY_INITIALIZER_IN_TRAIT!>0<!>; <!ILLEGAL_MODIFIER!>abstract<!> get <!ILLEGAL_MODIFIER!>abstract<!> set
var n: Int <!ILLEGAL_MODIFIER!>abstract<!> get <!ILLEGAL_MODIFIER!>abstract<!> set(v: Int) {}
}
}
@@ -31,4 +31,4 @@ class WithC() {
val <!UNUSED_VARIABLE!>b<!> = x
}
}
}
@@ -29,4 +29,4 @@ fun String.on(<!UNUSED_PARAMETER!>predicate<!> : (s : URI) -> Boolean) : URI {
class URI(val body : Any) {
fun to(<!UNUSED_PARAMETER!>dest<!> : String) {}
}
}
@@ -89,4 +89,4 @@ open class C {
t = <!UNUSED_VALUE!>this@C<!>
}
}
}
}
@@ -12,4 +12,4 @@ class A() {
val x : Int = <!TYPE_MISMATCH!>foo1(<!TOO_MANY_ARGUMENTS, UNRESOLVED_REFERENCE!>xx<!>)<!>
}
fun foo1() {}
fun foo1() {}
@@ -38,4 +38,4 @@ fun f(): Unit {
false || <!TYPE_MISMATCH!>y<!>
<!TYPE_MISMATCH!>y<!> && true
<!TYPE_MISMATCH!>y<!> && <!TYPE_MISMATCH!>1<!>
}
}
@@ -82,4 +82,4 @@ class C {
}
a<!UNSAFE_CALL!>.<!>compareTo("2")
}
}
}
@@ -157,4 +157,4 @@ fun println(message : Any?) {
fun print(message : Any?) {
System.out?.print(message)
}
}
@@ -13,4 +13,4 @@ fun test() : Unit {
x <!USELESS_CAST!>as?<!> Int? : Int?
y <!USELESS_CAST_STATIC_ASSERT_IS_FINE!>as?<!> Int? : Int?
#()
}
}
@@ -5,4 +5,4 @@ fun test() {
1 <!USELESS_CAST!>as<!> Byte
1 <!USELESS_CAST!>as<!> Int
<!ERROR_COMPILE_TIME_VALUE!>1<!> <!CAST_NEVER_SUCCEEDS!>as<!> Double
}
}
@@ -47,4 +47,4 @@ class NoCPI {
var ab = <!PROPERTY_INITIALIZER_NO_BACKING_FIELD!>1<!>
get() = 1
set(v) {}
}
}
@@ -27,4 +27,4 @@ fun test() {
f?.foo()
g?.foo()
h?.foo()
}
}
@@ -26,4 +26,4 @@ fun foo1() = {
fun println(<!UNUSED_PARAMETER!>i<!> : Int) {}
fun println(<!UNUSED_PARAMETER!>s<!> : Byte) {}
fun println() {}
fun println() {}
@@ -12,4 +12,4 @@ class A(x : Int = <!UNINITIALIZED_PARAMETER!>y<!>, y : Int = x) { // None of the
val z = 3
fun foo(x: Int = <!UNINITIALIZED_PARAMETER!>y<!>, y: Int = x, <!UNUSED_PARAMETER!>i<!> : Int = z): Int = x + y
fun foo(x: Int = <!UNINITIALIZED_PARAMETER!>y<!>, y: Int = x, <!UNUSED_PARAMETER!>i<!> : Int = z): Int = x + y
@@ -35,4 +35,4 @@ open class GC1(g : G<Int>) : G<Int> by g {
open class GC2(g : G<Int>) : GC1(g) {
}
}
@@ -10,4 +10,4 @@ class Br(t : T) : T by t {}
open enum class E() {}
class Test2(e : E) : <!DELEGATION_NOT_TO_TRAIT!>E<!> by e {}
class Test2(e : E) : <!DELEGATION_NOT_TO_TRAIT!>E<!> by e {}
@@ -7,4 +7,4 @@ enum class List<out T>(val size : Int) {
}
val foo = List.Nil
val foo1 = foo.a
val foo1 = foo.a
@@ -79,4 +79,4 @@ fun test() {
{}<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>()
1<!UNNECESSARY_SAFE_CALL!>?.<!>{Int.() -> 1}()
1.<!NO_RECEIVER_ADMITTED!>{}<!>()
}
}
@@ -211,4 +211,4 @@ fun testFunctionLiterals() {
object A {}
}
}
}
@@ -40,4 +40,4 @@ package sx2
trait AA1<in T> {}
trait AB1 : AA1<Int> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
trait AB2 : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>AA1<Number>, AB1, AB3<!> {}
@@ -5,4 +5,4 @@ fun foo(<!UNUSED_PARAMETER!>i<!> : Int) : Int = 1
fun test() {
foo(1) : Int
foo("s") : Unit
}
}
@@ -18,4 +18,4 @@ class FinalClass() {
<!ILLEGAL_MODIFIER!>open<!> get(): Int = $i
var j: Int = 1
<!ILLEGAL_MODIFIER!>open<!> set(v: Int) {}
}
}
@@ -43,4 +43,4 @@ fun testUnitIncDec() {
x = <!UNUSED_CHANGED_VALUE!>x<!INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!><!>
x = <!INC_DEC_SHOULD_NOT_RETURN_UNIT!>++<!>x
x = <!UNUSED_VALUE!><!INC_DEC_SHOULD_NOT_RETURN_UNIT!>--<!>x<!>
}
}
@@ -34,4 +34,4 @@ fun test() {
<!ERROR_COMPILE_TIME_VALUE, UNUSED_EXPRESSION!>'\u000z'<!>
<!ERROR_COMPILE_TIME_VALUE, UNUSED_EXPRESSION!>'\\u000'<!>
<!ERROR_COMPILE_TIME_VALUE, UNUSED_EXPRESSION!>'\'<!>
}
}
@@ -6,4 +6,4 @@ fun gg() {
if (a != null) {
ff(a)
}
}
}
@@ -4,4 +4,4 @@ fun test() {
}
}
}
}
@@ -20,4 +20,4 @@ fun test() {
bar(1, 1, "")
bar(1, <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>z<!> = "")
bar<!NO_VALUE_FOR_PARAMETER!>(1, <!UNRESOLVED_REFERENCE, MIXING_NAMED_AND_POSITIONED_ARGUMENTS!>zz<!> = "", <!MIXING_NAMED_AND_POSITIONED_ARGUMENTS!><!UNRESOLVED_REFERENCE!>zz<!>.foo<!>)<!>
}
}
@@ -28,4 +28,4 @@ class MyIterable<T> : Iterable<T>
throw UnsupportedOperationException()
}
}
}
}
@@ -1,4 +1,4 @@
fun test() {
fun <T> foo(){}
foo<<!PROJECTION_ON_NON_CLASS_TYPE_ARGUMENT!>in Int<!>>()
}
}
@@ -3,4 +3,4 @@ trait B<T> {}
trait C<T> {}
trait D<T> {}
trait Test : A<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>in<!> Int>, B<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>out<!> Int>, C<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>*<!>><!NULLABLE_SUPERTYPE!>?<!><!NULLABLE_SUPERTYPE!>?<!><!NULLABLE_SUPERTYPE!>?<!>, D<Int> {}
trait Test : A<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>in<!> Int>, B<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>out<!> Int>, C<<!PROJECTION_IN_IMMEDIATE_ARGUMENT_TO_SUPERTYPE!>*<!>><!NULLABLE_SUPERTYPE!>?<!><!NULLABLE_SUPERTYPE!>?<!><!NULLABLE_SUPERTYPE!>?<!>, D<Int> {}
@@ -10,4 +10,4 @@ fun test(s: String?) {
val <!UNUSED_VARIABLE!>g<!>: Boolean? = e.startsWith("s")//?.length
}
fun String.startsWith(<!UNUSED_PARAMETER!>s<!>: String): Boolean = true
fun String.startsWith(<!UNUSED_PARAMETER!>s<!>: String): Boolean = true
@@ -39,4 +39,4 @@ package closures
return (@a{Double.() -> this@a : Double + this@xx : Char})
}
}
}
}
@@ -37,4 +37,4 @@ package c
fun foo() : Int = bazz()
fun bar() = foo()
fun bar() = foo()
@@ -12,4 +12,4 @@ package redeclarations
// FILE: f.kt
package redeclarations.<!REDECLARATION, REDECLARATION!>A<!>
class A {}
class A {}
@@ -20,4 +20,4 @@ fun test(<!UNUSED_PARAMETER!>a<!> : java.util.ArrayList<Int>) {
fun test(<!UNUSED_PARAMETER!>a<!> : java.lang.Class<Int>) {
}
}
@@ -52,4 +52,4 @@ fun test(<!UNUSED_PARAMETER!>l<!> : java.util.List<Int>) {
// FILE: f.kt
package xxx
import java.lang.Class;
import java.lang.Class;
@@ -14,4 +14,4 @@ class A {
return<!UNRESOLVED_REFERENCE!>@inner<!>
return@outer
}
}
}
@@ -3,4 +3,4 @@
fun ff() {
val i: Int = 1
val <!UNUSED_VARIABLE!>a<!>: Int = i<!UNNECESSARY_SAFE_CALL!>?.<!>plus(2)
}
}
@@ -3,4 +3,4 @@ fun Int.gg() = null
fun ff() {
val a: Int = 1
val <!UNUSED_VARIABLE!>b<!>: Int = <!TYPE_MISMATCH!>a<!UNNECESSARY_SAFE_CALL!>?.<!>gg()<!>
}
}
@@ -19,4 +19,4 @@ fun demo() {
<!UNUSED_EXPRESSION!>"foo${bar + map {
"foo$sdf${ buzz{}}" }}sdfsdf"<!>
<!UNUSED_EXPRESSION!>"a<!ILLEGAL_ESCAPE_SEQUENCE!>\u<!> <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>0 <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>00 <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>000 \u0000 \u0AaA <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>0AAz.length( ) + \u0022b"<!>
}
}
@@ -86,4 +86,4 @@ class A1 {
fun test() {
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.equals(null)
}
}
}
@@ -47,4 +47,4 @@ class CTest4 : T1 {}
class CTest5 : T1, <!SUPERTYPE_APPEARS_TWICE!>T1<!> {}
class CTest6 : <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, FINAL_SUPERTYPE!>C1<!> {}
class CTest6 : <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, FINAL_SUPERTYPE!>C1<!> {}
@@ -8,4 +8,4 @@ trait Foo2 : bar, Foo {
}
open class Foo1() : bar(), <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!>, Foo, <!SUPERTYPE_APPEARS_TWICE!>Foo<!><!CONSTRUCTOR_IN_TRAIT!>()<!> {}
open class Foo12 : bar(), <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!> {}
open class Foo12 : bar(), <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!> {}
@@ -15,4 +15,4 @@ fun main(args : Array<String>) {
val <!UNUSED_VARIABLE!>bx<!> : C<in String> = bar()
val <!UNUSED_VARIABLE!>by<!> : C<out String> = bar()
val <!UNUSED_VARIABLE!>bz<!> : C<*> = bar()
}
}
@@ -349,4 +349,4 @@ fun test(m : M) {
fun test1(m : M) {
<!VAL_REASSIGNMENT!>m.x<!>++
m.y--
}
}
@@ -1,3 +1,3 @@
fun foo(f : () -> Unit) {
val <!UNUSED_VARIABLE!>x<!> : Unit = f()
}
}
@@ -165,4 +165,4 @@ fun nullIsNotNothing() : Unit {
fun returnInWhile(<!UNUSED_PARAMETER!>a<!>: Int) {
do {return}
while (<!UNREACHABLE_CODE!>1 > a<!>)
}
}
@@ -27,4 +27,4 @@ fun testUnresolved() {
}
}
fun foo1(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun foo1(<!UNUSED_PARAMETER!>i<!>: Int) {}
@@ -139,4 +139,4 @@ fun testBackingFieldsNotMarked() {
}
}
fun doSmth(<!UNUSED_PARAMETER!>i<!> : Int) {}
fun doSmth(<!UNUSED_PARAMETER!>i<!> : Int) {}
@@ -14,4 +14,4 @@ fun test() {
v1({}, {}, {it})
v1({}) <!VARARG_OUTSIDE_PARENTHESES!>{}<!>
v1 <!VARARG_OUTSIDE_PARENTHESES, DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED!>{}<!>
}
}
@@ -37,4 +37,4 @@ fun f(ints: Array<Int>, any: Array<Any>, numbers: Array<Number>) {
copy2(ints, <!TYPE_MISMATCH!>numbers<!>)
copy3<Int>(ints, numbers)
copy4(ints, numbers) //ok
}
}
+1 -1
View File
@@ -63,4 +63,4 @@ fun test() {
}
}
val #(Int, Int).boo : #(Int, Int, Int) = #(1, 1, 1)
val #(Int, Int).boo : #(Int, Int, Int) = #(1, 1, 1)
@@ -7,4 +7,4 @@ my fun foo() {}
my1(2) fun foo3() {}
my2() fun foo4() {}
my2 fun foo41() {}
my2(2) fun foo42() {}
my2(2) fun foo42() {}
@@ -4,4 +4,4 @@ abstract class ReadNonexistent() {
{
val x = <!NO_BACKING_FIELD_ABSTRACT_PROPERTY!>$aa<!>
}
}
}
@@ -2,4 +2,4 @@ abstract class ReadNonexistent {
abstract val aa: Int
fun ff() = <!NO_BACKING_FIELD_ABSTRACT_PROPERTY!>$aa<!>
}
}
@@ -5,4 +5,4 @@ class ReadNonexistent() {
{
val x = <!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$a<!>
}
}
}
@@ -3,4 +3,4 @@ class CustomValNoBackingField() {
get() = 1
val b = <!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$a<!>
}
}
@@ -3,4 +3,4 @@ class CustomValNoBackingField() {
get() = 1
val b = <!NO_BACKING_FIELD_CUSTOM_ACCESSORS!>$a<!>
}
}
@@ -4,4 +4,4 @@ class A() {
{
<!INACCESSIBLE_BACKING_FIELD!>$y<!> = 1
}
}
}
@@ -169,4 +169,4 @@ class T() {
}
}
}
}
}
@@ -17,4 +17,4 @@ get() = <!INACCESSIBLE_BACKING_FIELD!>$z<!>
fun foo() {
<!INACCESSIBLE_BACKING_FIELD!>$y<!> = 34
}
}
@@ -32,4 +32,4 @@ fun t2() : Int {
<!UNREACHABLE_CODE!>return 2<!>
}
fun doSmth() {}
fun doSmth() {}
@@ -48,4 +48,4 @@ fun t4() {
<!UNREACHABLE_CODE!>(43)<!>
}
fun doSmth() {}
fun doSmth() {}
@@ -34,4 +34,4 @@ fun test() {
second = first + second
first = temp
}
}
}
@@ -36,4 +36,4 @@ fun foo() {
finally {
for (i in 1..10) {}
}
}
}
@@ -15,4 +15,4 @@ public open class Identifier2() {
{
this.field = false;
}
}
}
@@ -15,4 +15,4 @@ fun foo(a: A) {
class A() {
val z : Int
get() = 3
}
}
@@ -16,4 +16,4 @@ open class A() {
class B() : A() {
final override fun foo(s : String) {} //should not be a warning
}
}
@@ -7,4 +7,4 @@ fun foo() {
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>i<!> = 1 //should be an error 'variable i is assigned but never accessed'
i = <!UNUSED_VALUE!>2<!>
}
}
@@ -35,4 +35,4 @@ fun test1() : Int {
}
}
fun doSmth() {}
fun doSmth() {}
@@ -5,4 +5,4 @@ package kt843
fun main(args : Array<String>) {
// Integer type
val // this word is grey, which looks strange
<!SYNTAX!>}<!SYNTAX!><!><!>
<!SYNTAX!>}<!SYNTAX!><!><!>
@@ -17,4 +17,4 @@ class A() {
<!INITIALIZATION_BEFORE_DECLARATION!>k<!> = 3
}
val k : Int
}
}
@@ -123,4 +123,4 @@ fun testStatementInExpressionContext() {
val <!UNUSED_VARIABLE!>f<!> = <!EXPRESSION_EXPECTED!>for (i in 1..10) {}<!>
if (true) return <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!>z = <!UNUSED_VALUE!>34<!><!>
return <!EXPRESSION_EXPECTED!>while (true) {}<!>
}
}
@@ -23,4 +23,4 @@ fun fff(): Int {
return 34
}
fun bar(): Int = 8
fun bar(): Int = 8
@@ -51,4 +51,4 @@ fun foo3(x: Int) = when(x) {
fun foo4(x: Int) = when(x) {
2 -> x
is val a -> a
}
}
@@ -19,4 +19,4 @@ class <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>C<!> : SomeTrait {}
fun foo2() {
val <!UNUSED_VARIABLE!>r<!> = <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>object<!> : Runnable {} //no error
}
}
@@ -27,4 +27,4 @@ class <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>B<!>() : A() {
super.fff() //everything is ok
return super.<!ABSTRACT_SUPER_CALL!>foo()<!> //no error!!
}
}
}
@@ -73,4 +73,4 @@ import outer.*
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
if (command == null) 1
}
}
@@ -18,4 +18,4 @@ class C : T {
super.buzz() // OK, resolved to a member
super.buzz1<!NO_VALUE_FOR_PARAMETER!>()<!> // Resolved to a member, but error: no parameter passed where required
}
}
}
@@ -32,4 +32,4 @@ fun main(args : Array<String>) {
for (x in i) {
System.out?.println(x)
}
}
}
@@ -31,4 +31,4 @@ class B() : A() {
s.foo
s.foo()
}
}
}
@@ -8,4 +8,4 @@ fun main(args : Array<String>) {
requiresInt(<!TYPE_MISMATCH!>intArray[0]<!>)
}
fun requiresInt(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun requiresInt(<!UNUSED_PARAMETER!>i<!>: Int) {}
@@ -250,4 +250,4 @@ fun foo(var a: Any): Int {
return <!AUTOCAST_IMPOSSIBLE!>a<!>
}
return 1
}
}
@@ -56,4 +56,4 @@ class TestPCParameters(w : Int, x : Int, val y : Int, var z : Int) : Super(w) {
fun foo() = <!UNRESOLVED_REFERENCE!>x<!>
}
}
@@ -38,4 +38,4 @@ fun test(x : Int?, a : A?) {
a <!UNSAFE_INFIX_CALL!>contains<!> 1
a<!UNSAFE_CALL!>.<!>contains(1)
a?.contains(1)
}
}
@@ -31,4 +31,4 @@ class A(a: String?) {
i = 3
}
}
}
}
@@ -4,4 +4,4 @@ package toplevelObjectDeclarations
object CObj {}
object DOjb : <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, FINAL_SUPERTYPE!>CObj<!> {}
object DOjb : <!SUPERTYPE_NOT_INITIALIZED_DEFAULT, FINAL_SUPERTYPE!>CObj<!> {}
@@ -33,4 +33,4 @@ class Test()
control.MouseMoved <!ASSIGNMENT_OPERATOR_SHOULD_RETURN_UNIT!>+=<!> { it.X } // here
control.MouseMoved.plusAssign( { it.X } ) // ok
}
}
}
@@ -9,4 +9,4 @@ val a1 = b.compareTo(2)
class Foo() {
fun compareTo(<!UNUSED_PARAMETER!>other<!> : Byte) : Int = 0
fun compareTo(<!UNUSED_PARAMETER!>other<!> : Char) : Int = 0
}
}
@@ -3,4 +3,4 @@ fun test() {
if (a is Any) else a = null;
while (a is Any) a = null
while (true) a = <!UNUSED_VALUE!>null<!>
}
}
@@ -6,4 +6,4 @@ fun test() : Int {
foo(<!TYPE_MISMATCH!>1<!>)
}
return 1
}
}
@@ -2,4 +2,4 @@ fun foo(<!UNUSED_PARAMETER!>a<!> : Any) {}
fun test() {
foo(object {});
}
}
@@ -11,4 +11,4 @@ return if (answer == 2) "OK" else "FAIL"
fun apply(arg:String, f : String.() -> Int) : Int {
return arg.f()
}
}
@@ -5,4 +5,4 @@ fun foo() {
h(1)
val m : (Int) -> Int = {(a : Int) -> 1}//foo1()
m(1)
}
}
@@ -5,4 +5,4 @@ fun set(<!UNUSED_PARAMETER!>key<!> : String, <!UNUSED_PARAMETER!>value<!> : Stri
is String, is Any -> a.compareTo("")
else -> a.toString()
}
}
}
@@ -3,4 +3,4 @@
class WithC() {
val a = 1
val b = $a // error here, but must not be
}
}
@@ -18,4 +18,4 @@ fun box(): String {
x = x.signal()
if (x != ProtocolState.WAITING) return "fail 2"
return "OK"
}
}
@@ -19,4 +19,4 @@ enum class Foo<T> {
fun box() {
val <!UNUSED_VARIABLE!>x<!>: ProtocolState = ProtocolState.WAITING
}
}
@@ -8,4 +8,4 @@ fun test() {
if (f != null) {
}
}
}
@@ -7,4 +7,4 @@ fun Any.equals(other : Any?) : Boolean = this === other
fun main(args: Array<String>) {
val command = parse("")
if (command == null) 1 // error on this line, but must be OK
}
}

Some files were not shown because too many files have changed in this diff Show More