forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from scala/backport-lts-3.3-21414
Backport "Avoid using the current denotation in NamedType.disambiguate" to 3.3 LTS
- Loading branch information
Showing
7 changed files
with
53 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
object Exports{ | ||
export OverloadedInline.* | ||
} |
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,20 @@ | ||
import scala.quoted.* | ||
|
||
object Macros{ | ||
|
||
inline def A() : String = { | ||
${ A_impl } | ||
} | ||
|
||
def A_impl(using Quotes): Expr[String] = { | ||
Expr("Whatever") | ||
} | ||
|
||
inline def B[T]: Int = { | ||
${ B_Impl[T] } | ||
} | ||
|
||
def B_Impl[T](using Quotes): Expr[Int] = { | ||
Expr(0) | ||
} | ||
} |
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,13 @@ | ||
import Macros.* | ||
|
||
object OverloadedInline{ | ||
|
||
A() | ||
inline def overloaded_inline[T]: Unit = { | ||
overloaded_inline[T](0) | ||
} | ||
|
||
inline def overloaded_inline[T](dummy: Int): Unit = { | ||
val crash = B[T] | ||
} | ||
} |
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,5 @@ | ||
import Exports.* | ||
|
||
object Test { | ||
overloaded_inline[Unit] | ||
} |