Create From Usage: Do not generate unnecessary/skip necessary empty lines

This commit is contained in:
Alexey Sedunov
2014-11-12 15:49:06 +03:00
parent 2e7cbab453
commit c487cc7838
123 changed files with 141 additions and 154 deletions
@@ -4,4 +4,4 @@ foo(1, "2") fun test() {
}
annotation class foo(val i: Int, val s: String)
annotation class foo(val i: Int, val s: String)
@@ -4,4 +4,4 @@
}
annotation class foo
annotation class foo
@@ -4,4 +4,4 @@
}
annotation class foo
annotation class foo
@@ -4,4 +4,4 @@
}
annotation class foo(val i: Int, val s: String)
annotation class foo(val i: Int, val s: String)
@@ -4,4 +4,4 @@
}
annotation class foo(val i: Int, val s: String)
annotation class foo(val i: Int, val s: String)
@@ -4,4 +4,4 @@
}
annotation class foo(val value: Int)
annotation class foo(val value: Int)
@@ -4,4 +4,4 @@
}
annotation class foo(val fooBar: Int)
annotation class foo(val fooBar: Int)
@@ -5,4 +5,4 @@
}
annotation class bar(val s: String, val i: Int)
annotation class bar(val s: String, val i: Int)
@@ -8,4 +8,4 @@ fun test() {
class Foo {
}
}
@@ -6,4 +6,4 @@ fun test() {
class Foo(i: Int, s: String) {
}
}
@@ -8,4 +8,4 @@ class A {
class Foo(i: Int, s: String) {
}
}
@@ -4,4 +4,4 @@ fun test() = Foo(2, "2")
class Foo(i: Int, s: String) {
}
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
class A<T>(val n: T) {
class Foo(i: Int) {
}
@@ -6,4 +6,4 @@ fun test() = Foo(abc = 1, ghi = A(2), def = "s")
class Foo(abc: Int, ghi: A, def: String) {
}
}
@@ -3,7 +3,6 @@
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>U</td></tr></table></html>
class A<T>(val n: T) {
inner class Foo<U>(u: U) {
}
@@ -6,4 +6,4 @@ fun test() {
class Foo(i: Int, s: String, function: Function1<Int, Int>) {
}
}
@@ -6,4 +6,4 @@ fun test() {
class Foo(function: Function1<Int, Int>) {
}
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
object A {
class Foo(i: Int) {
}
@@ -6,4 +6,4 @@ fun test() = Foo(2, "2")
class Foo(i: Int, s: String) {
}
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
class A<T>(val n: T) {
inner class Foo(i: Int) {
}
@@ -6,4 +6,4 @@ fun test(): A = Foo(2, "2")
class Foo(i: Int, s: String) : A() {
}
}
@@ -7,4 +7,4 @@ fun test(): A = Foo(2, "2")
class Foo(i: Int, s: String) : A() {
}
}
@@ -6,4 +6,4 @@ fun test(): A = Foo(2, "2")
class Foo(i: Int, s: String) : A {
}
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
class A<T>(val n: T) {
inner class Foo(i: Int, s: String) {
}
@@ -5,4 +5,4 @@
}
annotation class bar(val s: String, val i: Int)
annotation class bar(val s: String, val i: Int)
@@ -5,4 +5,4 @@
}
annotation class bar(val value: String)
annotation class bar(val value: String)
@@ -5,4 +5,4 @@
}
annotation class bar(val fooBar: String)
annotation class bar(val fooBar: String)
@@ -6,4 +6,4 @@ fun test() {
class Foo(i: Int, s: String) {
}
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
class B<T>(val t: T) {
class Foo<U, V>(u: U, v: V) {
}
@@ -3,7 +3,6 @@
// ERROR: An integer literal does not conform to the expected type U
class B<T>(val t: T) {
inner class Foo<U, V>(u: U, v: V) {
}
@@ -2,7 +2,6 @@
// ERROR: <html>Type mismatch.<table><tr><td>Required:</td><td>U</td></tr><tr><td>Found:</td><td>kotlin.String</td></tr></table></html>
class B<T>(val t: T) {
inner class Foo<U>(i: Int, u: U) {
}
@@ -3,7 +3,6 @@
// ERROR: An integer literal does not conform to the expected type V
class B<T>(val t: T) {
inner class Foo<U, V, W>(v: V, w: W) {
}
@@ -1,7 +1,6 @@
// "Create class 'Foo'" "true"
class B<T>(val t: T) {
class Foo<U>(i: Int, u: U) {
}
@@ -4,4 +4,4 @@ fun test() = Foo<String, Int>(2, "2")
class Foo<T, U>(u: U, t: T) {
}
}
@@ -4,4 +4,4 @@ fun test() = Foo<String, Int, Boolean>(2, "2")
class Foo<T, U, V>(u: U, t: T) {
}
}
@@ -4,4 +4,4 @@ fun test() = Foo<String, Int>(2, "2")
class Foo<T, U>(u: U, t: T) {
}
}
@@ -4,4 +4,4 @@ fun test() = Foo<Int>(2, "2")
class Foo<T>(t: T, s: String) {
}
}
@@ -8,4 +8,4 @@ fun test(a: A): A = Foo<A, Int>(a, 1)
class Foo<T, U>(a: T, u: U) : A() {
}
}
@@ -7,4 +7,4 @@ class Foo: A(1, "2") {
open class A(i: Int, s: String) {
}
}
@@ -2,7 +2,6 @@
package p
class X {
open class A(i: Int, s: String) {
}
@@ -7,4 +7,4 @@ class Foo: p.A(1, "2") {
open class A(i: Int, s: String) {
}
}
@@ -11,4 +11,4 @@ class Foo: A(abc = 1, ghi = "2", def = B()) {
open class A(abc: Int, ghi: String, def: B) {
}
}
@@ -7,4 +7,4 @@ class Foo: A<Int, String>(1, "2") {
open class A<T, U>(t: T, u: U) {
}
}
@@ -7,4 +7,4 @@ class Foo: A {
trait A {
}
}
@@ -3,4 +3,4 @@ package p
import p.A
annotation class A
annotation class A
@@ -4,7 +4,6 @@ package p
import p.X.A
class X {
annotation class A
}
@@ -5,4 +5,4 @@ import p.A
class A {
}
}
@@ -4,7 +4,6 @@ package p
import p.X.A
class X {
class A {
}
@@ -4,7 +4,6 @@ package p
import p.E.A
enum class E {
A
}
@@ -5,4 +5,4 @@ import p.A
enum class A {
}
}
@@ -4,7 +4,6 @@ package p
import p.X.A
class X {
enum class A {
}
@@ -5,4 +5,4 @@ import p.A
object A {
}
}
@@ -4,7 +4,6 @@ package p
import p.X.A
class X {
object A {
}
@@ -5,4 +5,4 @@ import p.A
trait A {
}
}
@@ -4,7 +4,6 @@ package p
import p.X.A
class X {
trait A {
}
@@ -5,7 +5,6 @@ package p
fun foo() = A.B.C
class A {
class B {
}
@@ -6,4 +6,4 @@ fun foo() = A.B
class A {
}
}
@@ -6,4 +6,4 @@ fun foo() = A.B
enum class A {
}
}
@@ -4,7 +4,6 @@ package p
fun foo() = X.A
enum class X {
A
}
@@ -5,7 +5,6 @@ package p
fun foo() = X.A
enum class X(n: Int) {
A : X()
}
@@ -4,7 +4,6 @@ package p
fun foo(): E = E.A
enum class E {
A
}
@@ -6,4 +6,4 @@ fun foo() = A.B
object A {
}
}
@@ -5,4 +5,4 @@ fun foo() = p.A
object A {
}
}
@@ -5,4 +5,4 @@ fun foo() = A
object A {
}
}
@@ -4,7 +4,6 @@ package p
fun foo() = X.A
class X {
object A {
}
@@ -9,4 +9,4 @@ open class X {
object A : X() {
}
}
@@ -9,4 +9,4 @@ trait X {
object A : X {
}
}
@@ -6,4 +6,4 @@ fun foo() = A.B
trait A {
}
}
@@ -6,4 +6,4 @@ fun test() {
object Foo {
}
}
@@ -3,4 +3,4 @@ package p
fun foo(): A = throw Throwable("")
annotation class A
annotation class A
@@ -5,4 +5,4 @@ fun foo(): p.A = throw Throwable("")
class A {
}
}
@@ -5,4 +5,4 @@ fun foo(): A = throw Throwable("")
class A {
}
}
@@ -5,4 +5,4 @@ fun foo(): A<Int, String> = throw Throwable("")
class A<T, U> {
}
}
@@ -6,4 +6,4 @@ fun foo(): A.B = throw Throwable("")
class A {
}
}
@@ -2,7 +2,6 @@
package p
class T {
class A {
}
@@ -0,0 +1,10 @@
// "Create class 'A'" "true"
package p
class T {
class A {
}
}
fun foo(): T.A = throw Throwable("")
@@ -5,4 +5,4 @@ fun foo(): A = throw Throwable("")
enum class A {
}
}
@@ -6,4 +6,4 @@ fun foo(): A.B = throw Throwable("")
object A {
}
}
@@ -5,4 +5,4 @@ fun foo(): A = throw Throwable("")
trait A {
}
}
@@ -0,0 +1,6 @@
// "Create class 'A'" "true"
package p
class T
fun foo(): T.<caret>A = throw Throwable("")