Skip to content

Commit 1a9ec23

Browse files
committed
Simplification: Inline givenReflection
1 parent 124a491 commit 1a9ec23

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ class Typer extends Namer
19481948
fun = ref(defn.QuotedMatcher_unapplyR).appliedToType(patType),
19491949
implicits =
19501950
ref(defn.InternalQuoted_exprQuoteR).appliedToType(shape.tpe).appliedTo(shape) ::
1951-
givenReflection(tree.span) :: Nil,
1951+
implicitArgTree(defn.TastyReflectionType, tree.span) :: Nil,
19521952
patterns = splicePat :: Nil,
19531953
proto = pt)
19541954
}
@@ -1979,9 +1979,6 @@ class Typer extends Namer
19791979
def patternHole(splice: Tree)(implicit ctx: Context): Tree =
19801980
ref(defn.InternalQuoted_patternHoleR).appliedToType(splice.tpe).withSpan(splice.span)
19811981

1982-
def givenReflection(span: Span)(implicit ctx: Context): Tree =
1983-
implicitArgTree(defn.TastyReflectionType, span)
1984-
19851982
/** Translate `${ t: Expr[T] }` into expression `t.splice` while tracking the quotation level in the context */
19861983
def typedSplice(tree: untpd.Splice, pt: Type)(implicit ctx: Context): Tree = track("typedSplice") {
19871984
checkSpliceOutsideQuote(tree)

0 commit comments

Comments
 (0)