Rewrite Java resolve to use static class scope instead of synthesized packages

#KT-4149 Fixed
 #KT-4839 Fixed
This commit is contained in:
Alexander Udalov
2014-09-03 14:42:03 +04:00
parent 75df4a9ad8
commit bcfb5f3b09
41 changed files with 217 additions and 419 deletions
@@ -1,31 +1,29 @@
package test
public trait Nested {
public trait Deeper1 {
public trait Runnable {
public abstract fun run(): kotlin.Unit
public abstract fun run2(): kotlin.Unit
}
}
public trait Deeper2 {
public trait Runnable {
public abstract fun run(): kotlin.Unit
}
// Static members
public final /*synthesized*/ fun Runnable(/*0*/ function: () -> kotlin.Unit): test.Nested.Deeper2.Runnable
}
public trait Runnable {
public abstract fun run(): kotlin.Unit
}
}
package test.Nested {
public /*synthesized*/ fun Runnable(/*0*/ function: () -> kotlin.Unit): test.Nested.Runnable
package test.Nested.Deeper2 {
public /*synthesized*/ fun Runnable(/*0*/ function: () -> kotlin.Unit): test.Nested.Deeper2.Runnable
}
// Static members
public final /*synthesized*/ fun Runnable(/*0*/ function: () -> kotlin.Unit): test.Nested.Runnable
}
@@ -1,22 +1,21 @@
package test
public trait SamSubinterfaceOfTwo {
public trait Sub : test.SamSubinterfaceOfTwo.Super1, test.SamSubinterfaceOfTwo.Super2<kotlin.String> {
public abstract override /*2*/ /*fake_override*/ fun f(): kotlin.String?
}
public trait Super1 {
public abstract fun f(): kotlin.CharSequence?
}
public trait Super2</*0*/ T> {
public abstract fun f(): T?
}
}
package test.SamSubinterfaceOfTwo {
public /*synthesized*/ fun Sub(/*0*/ function: () -> kotlin.String?): test.SamSubinterfaceOfTwo.Sub
public /*synthesized*/ fun Super1(/*0*/ function: () -> kotlin.CharSequence?): test.SamSubinterfaceOfTwo.Super1
public /*synthesized*/ fun </*0*/ T> Super2(/*0*/ function: () -> T?): test.SamSubinterfaceOfTwo.Super2<T>
// Static members
public final /*synthesized*/ fun Sub(/*0*/ function: () -> kotlin.String?): test.SamSubinterfaceOfTwo.Sub
public final /*synthesized*/ fun Super1(/*0*/ function: () -> kotlin.CharSequence?): test.SamSubinterfaceOfTwo.Super1
public final /*synthesized*/ fun </*0*/ T> Super2(/*0*/ function: () -> T?): test.SamSubinterfaceOfTwo.Super2<T>
}
@@ -4,9 +4,8 @@ public open class Basic {
public constructor Basic()
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public open fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
package test.Basic {
public /*synthesized*/ fun bar(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
// Static members
public final /*synthesized*/ fun bar(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public open fun bar(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
@@ -1,19 +1,18 @@
package test
public trait DeepSamLoop {
public trait Bar {
public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Bar?) -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Foo?): kotlin.Unit
}
public trait Foo {
public final /*synthesized*/ fun foo(/*0*/ p0: ((test.DeepSamLoop.Foo?) -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: test.DeepSamLoop.Bar?): kotlin.Unit
}
}
package test.DeepSamLoop {
public /*synthesized*/ fun Bar(/*0*/ function: (test.DeepSamLoop.Foo?) -> kotlin.Unit): test.DeepSamLoop.Bar
public /*synthesized*/ fun Foo(/*0*/ function: (test.DeepSamLoop.Bar?) -> kotlin.Unit): test.DeepSamLoop.Foo
// Static members
public final /*synthesized*/ fun Bar(/*0*/ function: (test.DeepSamLoop.Foo?) -> kotlin.Unit): test.DeepSamLoop.Bar
public final /*synthesized*/ fun Foo(/*0*/ function: (test.DeepSamLoop.Bar?) -> kotlin.Unit): test.DeepSamLoop.Foo
}
@@ -2,9 +2,8 @@ package test
public open class SeveralSamParameters {
public constructor SeveralSamParameters()
}
package test.SeveralSamParameters {
public /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?, /*1*/ p1: kotlin.String?, /*2*/ p2: kotlin.String?, /*3*/ p3: (() -> kotlin.Unit)?): kotlin.String?
// Static members
public final /*synthesized*/ fun findMaxAndInvokeCallback(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?, /*1*/ p1: kotlin.String?, /*2*/ p2: kotlin.String?, /*3*/ p3: (() -> kotlin.Unit)?): kotlin.String?
public open fun findMaxAndInvokeCallback(/*0*/ p0: java.util.Comparator<kotlin.String>?, /*1*/ p1: kotlin.String?, /*2*/ p2: kotlin.String?, /*3*/ p3: java.lang.Runnable?): kotlin.String?
}
@@ -2,13 +2,12 @@ package test
public open class TypeParameterOfMethod {
public constructor TypeParameterOfMethod()
}
package test.TypeParameterOfMethod {
public /*synthesized*/ fun </*0*/ T> max(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
// Static members
public final /*synthesized*/ fun </*0*/ T> max(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open fun </*0*/ T> max(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public /*synthesized*/ fun </*0*/ T : kotlin.CharSequence?> max2(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public final /*synthesized*/ fun </*0*/ T : kotlin.CharSequence?> max2(/*0*/ p0: ((T, T) -> kotlin.Int)?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public open fun </*0*/ T : kotlin.CharSequence?> max2(/*0*/ p0: java.util.Comparator<T>?, /*1*/ p1: T?, /*2*/ p2: T?): T?
public /*synthesized*/ fun </*0*/ A : kotlin.CharSequence?, /*1*/ B : kotlin.List<A>?> method(/*0*/ p0: ((A, A) -> kotlin.Int)?, /*1*/ p1: B?): kotlin.Unit
public final /*synthesized*/ fun </*0*/ A : kotlin.CharSequence?, /*1*/ B : kotlin.List<A>?> method(/*0*/ p0: ((A, A) -> kotlin.Int)?, /*1*/ p1: B?): kotlin.Unit
public open fun </*0*/ A : kotlin.CharSequence?, /*1*/ B : kotlin.List<A>?> method(/*0*/ p0: java.util.Comparator<A>?, /*1*/ p1: B?): kotlin.Unit
}
@@ -1,18 +1,17 @@
package test
public trait AdapterDoesntOverrideDeclaration {
public trait Sub : test.AdapterDoesntOverrideDeclaration.Super {
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
public trait Super {
public abstract fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
}
}
package test.AdapterDoesntOverrideDeclaration {
public /*synthesized*/ fun Super(/*0*/ function: ((() -> kotlin.Unit)?) -> kotlin.Unit): test.AdapterDoesntOverrideDeclaration.Super
// Static members
public final /*synthesized*/ fun Super(/*0*/ function: ((() -> kotlin.Unit)?) -> kotlin.Unit): test.AdapterDoesntOverrideDeclaration.Super
}
@@ -1,25 +1,24 @@
package test
public trait InheritedSameAdapters {
public trait Sub : test.InheritedSameAdapters.Super1, test.InheritedSameAdapters.Super2 {
public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
public trait Super1 {
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
public trait Super2 {
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
}
package test.InheritedSameAdapters {
public /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Sub
public /*synthesized*/ fun Super1(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Super1
public /*synthesized*/ fun Super2(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Super2
// Static members
public final /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Sub
public final /*synthesized*/ fun Super1(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Super1
public final /*synthesized*/ fun Super2(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSameAdapters.Super2
}
@@ -1,31 +1,30 @@
package test
public trait InheritedSameAdaptersWithSubstitution {
public trait Sub : test.InheritedSameAdaptersWithSubstitution.Super1, test.InheritedSameAdaptersWithSubstitution.Super2Substituted {
public final override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit
public abstract override /*2*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator<kotlin.String>?): kotlin.Unit
}
public trait Super1 {
public final /*synthesized*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.util.Comparator<kotlin.String>?): kotlin.Unit
}
public trait Super2</*0*/ T> {
public final /*synthesized*/ fun foo(/*0*/ p0: ((T, T) -> kotlin.Int)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.util.Comparator<T>?): kotlin.Unit
}
public trait Super2Substituted : test.InheritedSameAdaptersWithSubstitution.Super2<kotlin.String> {
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: ((kotlin.String, kotlin.String) -> kotlin.Int)?): kotlin.Unit
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.util.Comparator<kotlin.String>?): kotlin.Unit
}
}
package test.InheritedSameAdaptersWithSubstitution {
public /*synthesized*/ fun Sub(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Sub
public /*synthesized*/ fun Super1(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super1
public /*synthesized*/ fun </*0*/ T> Super2(/*0*/ function: (java.util.Comparator<T>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2<T>
public /*synthesized*/ fun Super2Substituted(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2Substituted
// Static members
public final /*synthesized*/ fun Sub(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Sub
public final /*synthesized*/ fun Super1(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super1
public final /*synthesized*/ fun </*0*/ T> Super2(/*0*/ function: (java.util.Comparator<T>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2<T>
public final /*synthesized*/ fun Super2Substituted(/*0*/ function: (java.util.Comparator<kotlin.String>?) -> kotlin.Unit): test.InheritedSameAdaptersWithSubstitution.Super2Substituted
}
@@ -1,19 +1,18 @@
package test
public trait InheritedSimple {
public trait Sub : test.InheritedSimple.Super {
public final override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
public trait Super {
public final /*synthesized*/ fun foo(/*0*/ p0: (() -> kotlin.Unit)?): kotlin.Unit
public abstract fun foo(/*0*/ p0: java.lang.Runnable?): kotlin.Unit
}
}
package test.InheritedSimple {
public /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Sub
public /*synthesized*/ fun Super(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Super
// Static members
public final /*synthesized*/ fun Sub(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Sub
public final /*synthesized*/ fun Super(/*0*/ function: (java.lang.Runnable?) -> kotlin.Unit): test.InheritedSimple.Super
}