@@ -1694,6 +1694,8 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
1694
1694
end SimpleSelectorTypeTest
1695
1695
1696
1696
object SimpleSelector extends SimpleSelectorModule :
1697
+ def apply (name : String ): SimpleSelector =
1698
+ withDefaultPos(untpd.ImportSelector (untpd.Ident (name.toTermName)))
1697
1699
def unapply (x : SimpleSelector ): Some [String ] = Some (x.name.toString)
1698
1700
end SimpleSelector
1699
1701
@@ -1713,6 +1715,8 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
1713
1715
end RenameSelectorTypeTest
1714
1716
1715
1717
object RenameSelector extends RenameSelectorModule :
1718
+ def apply (fromName : String , toName : String ): RenameSelector =
1719
+ withDefaultPos(untpd.ImportSelector (untpd.Ident (fromName.toTermName), untpd.Ident (toName.toTermName)))
1716
1720
def unapply (x : RenameSelector ): (String , String ) = (x.fromName, x.toName)
1717
1721
end RenameSelector
1718
1722
@@ -1738,6 +1742,8 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
1738
1742
end OmitSelectorTypeTest
1739
1743
1740
1744
object OmitSelector extends OmitSelectorModule :
1745
+ def apply (name : String ): OmitSelector =
1746
+ withDefaultPos(untpd.ImportSelector (untpd.Ident (name.toTermName), untpd.Ident (nme.WILDCARD )))
1741
1747
def unapply (x : OmitSelector ): Some [String ] = Some (x.imported.name.toString)
1742
1748
end OmitSelector
1743
1749
@@ -1758,6 +1764,11 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
1758
1764
end GivenSelectorTypeTest
1759
1765
1760
1766
object GivenSelector extends GivenSelectorModule :
1767
+ def apply (bound : Option [TypeTree ]): GivenSelector =
1768
+ withDefaultPos(untpd.ImportSelector (
1769
+ untpd.Ident (nme.EMPTY ),
1770
+ bound = bound.map(tpt => untpd.TypedSplice (tpt)).getOrElse(EmptyTree )
1771
+ ))
1761
1772
def unapply (x : GivenSelector ): Some [Option [TypeTree ]] =
1762
1773
Some (GivenSelectorMethods .bound(x))
1763
1774
end GivenSelector
0 commit comments