forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle import aliases of implicit definitions
This makes scala#2405 work again.
- Loading branch information
Showing
5 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
object A { implicit val x: Int = 1 } | ||
|
||
// Problem as stated in the ticket. | ||
object Test1 { | ||
import A.{x => y} | ||
implicitly[Int] | ||
} | ||
|
||
// Testing for the absense of shadowing #1. | ||
object Test2 { | ||
import A.{x => y} | ||
val x = 2 | ||
implicitly[Int] | ||
} | ||
|
||
// Testing for the absense of shadowing #2. | ||
object Test3 { | ||
{ | ||
import A.{x => y} | ||
def x: Int = 0 | ||
implicitly[Int] | ||
} | ||
} |