Skip to content

Commit

Permalink
Symbol type
Browse files Browse the repository at this point in the history
  • Loading branch information
cchantep committed Oct 23, 2021
1 parent f7abd32 commit e986a97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler

def name: String = self.denot.name.toString
def fullName: String = self.denot.fullName.toString
def tpe: TypeRepr = self.denot.info
def pos: Option[Position] =
if self.exists then Some(self.sourcePos) else None

Expand Down
3 changes: 3 additions & 0 deletions library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3585,6 +3585,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
/** The full name of this symbol up to the root package */
def fullName: String

/** The type of this symbol */
def tpe: TypeRepr

/** The position of this symbol */
def pos: Option[Position]

Expand Down

0 comments on commit e986a97

Please sign in to comment.