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.
Move quoted.{Expr|Type}.apply to scala.internal.Quoted
- Loading branch information
1 parent
6571053
commit caf3f11
Showing
17 changed files
with
53 additions
and
31 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
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,15 @@ | ||
package scala.internal | ||
|
||
import scala.quoted._ | ||
|
||
object Quoted { | ||
|
||
/** A term quote is desugared by the compiler into a call to this method */ | ||
def exprQuote[T](x: T): Expr[T] = | ||
throw new Error("Internal error: this method call should have been replaced by the compiler") | ||
|
||
/** A type quote is desugared by the compiler into a call to this method */ | ||
def typeQuote[T <: AnyKind]: Type[T] = | ||
throw new Error("Internal error: this method call should have been replaced by the compiler") | ||
|
||
} |
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,15 @@ | ||
package scala.internal | ||
|
||
import scala.quoted._ | ||
|
||
object Quoted { | ||
|
||
/** A term quote is desugared by the compiler into a call to this method */ | ||
def exprQuote[T](x: T): Expr[T] = | ||
throw new Error("Internal error: this method call should have been replaced by the compiler") | ||
|
||
/** A type quote is desugared by the compiler into a call to this method */ | ||
def typeQuote[T/* <: AnyKind */]: Type[T] = | ||
throw new Error("Internal error: this method call should have been replaced by the compiler") | ||
|
||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
scala.quoted.Expr.apply[scala.Int](3) | ||
scala.internal.Quoted.exprQuote[scala.Int](3) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
val a: scala.quoted.Expr[scala.Int] = scala.quoted.Expr.apply[scala.Int](4) | ||
val a: scala.quoted.Expr[scala.Int] = scala.internal.Quoted.exprQuote[scala.Int](4) | ||
a | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
val t: scala.quoted.Type[scala.Predef.String] = scala.quoted.Type.apply[scala.Predef.String] | ||
val t: scala.quoted.Type[scala.Predef.String] = scala.internal.Quoted.typeQuote[scala.Predef.String] | ||
|
||
(t: scala.quoted.Type[scala.Predef.String]) | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
val a: scala.quoted.Expr[scala.Int] = scala.quoted.Expr.apply[scala.Int](4) | ||
val a: scala.quoted.Expr[scala.Int] = scala.internal.Quoted.exprQuote[scala.Int](4) | ||
a | ||
} |