Allow resolve class declarations in class objects
Use INACCESSIBLE_OUTER_CLASS_EXPRESSION error for marking already resolved elements #KT-3261 Fixed
This commit is contained in:
@@ -3,7 +3,7 @@ package test
|
||||
internal final class Some {
|
||||
/*primary*/ public constructor Some()
|
||||
|
||||
[ERROR : Unresolved annotation type]() internal class object <class-object-for-Some> {
|
||||
test.Some.TestAnnotation() internal class object <class-object-for-Some> {
|
||||
/*primary*/ private constructor <class-object-for-Some>()
|
||||
|
||||
internal final annotation class TestAnnotation : jet.Annotation {
|
||||
|
||||
@@ -5,7 +5,7 @@ internal fun testFun(/*0*/ a: jet.Int): jet.Int
|
||||
internal final class TestSome</*0*/ P> {
|
||||
/*primary*/ public constructor TestSome</*0*/ P>()
|
||||
|
||||
internal class object <class-object-for-TestSome> : test.ToResolve<[ERROR : P]> {
|
||||
internal class object <class-object-for-TestSome> : test.ToResolve<P> {
|
||||
/*primary*/ private constructor <class-object-for-TestSome>()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Test {
|
||||
fun test(): Int = 12
|
||||
|
||||
class object {
|
||||
val a = test() // Check if resolver will be able to infer type of a variable
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
internal final class Test {
|
||||
/*primary*/ public constructor Test()
|
||||
internal final fun test(): jet.Int
|
||||
|
||||
internal class object <class-object-for-Test> {
|
||||
/*primary*/ private constructor <class-object-for-Test>()
|
||||
internal final val a: jet.Int
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user