Skip to content

Commit 8993ec1

Browse files
smartersjrd
authored andcommitted
Add types for implicit pos
For some reason if we don't do that we get cyclic reference errors, this will need to be investigated.
1 parent 256175e commit 8993ec1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/src/dotty/tools/backend/backend/sjs/JSCodeGen.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class JSCodeGen()(implicit ctx: Context) {
127127
/* Finally, we emit true code for the remaining class defs. */
128128
for (td <- allTypeDefs) {
129129
val sym = td.symbol
130-
implicit val pos = sym.pos
130+
implicit val pos: Position = sym.pos
131131

132132
/* Do not actually emit code for primitive types nor scala.Array. */
133133
val isPrimitive =
@@ -203,7 +203,7 @@ class JSCodeGen()(implicit ctx: Context) {
203203
*/
204204
private def genScalaClass(td: TypeDef): js.ClassDef = {
205205
val sym = td.symbol.asClass
206-
implicit val pos = sym.pos
206+
implicit val pos: Position = sym.pos
207207

208208
assert(!sym.is(Trait),
209209
"genScalaClass() must be called only for normal classes: "+sym)
@@ -336,7 +336,7 @@ class JSCodeGen()(implicit ctx: Context) {
336336
*/
337337
private def genRawJSClassData(td: TypeDef): js.ClassDef = {
338338
val sym = td.symbol.asClass
339-
implicit val pos = sym.pos
339+
implicit val pos: Position = sym.pos
340340

341341
val classIdent = encodeClassFullNameIdent(sym)
342342
val kind = {
@@ -363,7 +363,7 @@ class JSCodeGen()(implicit ctx: Context) {
363363
*/
364364
private def genInterface(td: TypeDef): js.ClassDef = {
365365
val sym = td.symbol.asClass
366-
implicit val pos = sym.pos
366+
implicit val pos: Position = sym.pos
367367

368368
val classIdent = encodeClassFullNameIdent(sym)
369369

0 commit comments

Comments
 (0)