Changed imports semantics: imports order does not affect resolve, explicit imports have higher priority for classes
This commit is contained in:
@@ -5,7 +5,7 @@ package test
|
||||
import testing.first.*
|
||||
import testing.second.*
|
||||
|
||||
val a1: `second`TestClass? = null
|
||||
val a1: `!`TestClass? = null
|
||||
|
||||
//FILE:mainToFirst.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
@@ -14,16 +14,16 @@ package test
|
||||
import testing.second.*
|
||||
import testing.first.*
|
||||
|
||||
val a2: `first`TestClass? = null
|
||||
val a2: `!`TestClass? = null
|
||||
|
||||
//FILE:importFirst.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package testing.first
|
||||
|
||||
class ~first~TestClass
|
||||
class TestClass
|
||||
|
||||
//FILE:importSecond.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package testing.second
|
||||
|
||||
class ~second~TestClass
|
||||
class TestClass
|
||||
@@ -16,7 +16,7 @@ import testing.second.TestClass
|
||||
import testing.first.*
|
||||
|
||||
// Single import has priority over package import
|
||||
val a2: `first`TestClass? = null
|
||||
val a2: `second`TestClass? = null
|
||||
|
||||
|
||||
//FILE:importFirst.kt
|
||||
|
||||
@@ -5,7 +5,7 @@ package test
|
||||
import testing.first.TestClass
|
||||
import testing.second.TestClass
|
||||
|
||||
val a1: `second`TestClass? = null
|
||||
val a1: `!`TestClass? = null
|
||||
|
||||
//FILE:mainToFirst.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
@@ -14,13 +14,13 @@ package test
|
||||
import testing.second.TestClass
|
||||
import testing.first.TestClass
|
||||
|
||||
val a2: `first`TestClass? = null
|
||||
val a2: `!`TestClass? = null
|
||||
|
||||
//FILE:importFirst.kt
|
||||
//----------------------------------------------------------------------------------
|
||||
package testing.first
|
||||
|
||||
class ~first~TestClass
|
||||
class TestClass
|
||||
|
||||
|
||||
//FILE:importSecond.kt
|
||||
@@ -28,4 +28,4 @@ class ~first~TestClass
|
||||
package testing.second
|
||||
class testing.second
|
||||
|
||||
class ~second~TestClass
|
||||
class TestClass
|
||||
@@ -8,7 +8,7 @@ import testing.allUnder.*
|
||||
|
||||
// The goal is to activate lazy resolve in order Second, Other
|
||||
class FirstOrder: `other`Other, FirstInternal
|
||||
trait FirstInternal: `allUnder`Second
|
||||
trait FirstInternal: `exact`Second
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import testing.allUnder.*
|
||||
|
||||
// The goal is to activate lazy resolve in order Other, Second
|
||||
class FirstOrder: FirstInternal, `other`Other
|
||||
trait FirstInternal: `allUnder`Second
|
||||
trait FirstInternal: `exact`Second
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user