Skip to content

Commit 7753615

Browse files
committed
Workaround for type issue in QuoteCompiler
1 parent dbc4592 commit 7753615

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

staging/src/scala/quoted/staging/QuoteCompiler.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ private class QuoteCompiler extends Compiler:
6868
val cls = newCompleteClassSymbol(defn.RootClass, outputClassName, EmptyFlags,
6969
defn.ObjectType :: Nil, newScope, coord = pos, assocFile = assocFile).entered.asClass
7070
cls.enter(newDefaultConstructor(cls), EmptyScope)
71-
val meth = newSymbol(cls, nme.apply, Method, ExprType(defn.AnyType), coord = pos).entered
71+
val meth = newSymbol(cls.asInstanceOf, nme.apply, Method, ExprType(defn.AnyType), coord = pos).entered
72+
//TODO (dotty problem): we get an error for `cls` above without the `asInstanceOf`:
73+
// Found: (cls : dotty.tools.dotc.core.Symbols.ClassSymbol)
74+
// Required: dotty.tools.dotc.core.Symbols.Symbol
75+
//Figure out what'st he cause of this.
7276

7377
val quoted =
7478
given Context = unitCtx.withOwner(meth)

0 commit comments

Comments
 (0)