Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke a REPL slayer #11726

Open
som-snytt opened this issue Sep 4, 2019 · 0 comments

Comments

@som-snytt
Copy link

commented Sep 4, 2019

$ scala
Welcome to Scala 2.13.0 (OpenJDK 64-Bit Server VM, Java 11.0.3).
Type in expressions for evaluation. Or try :help.

scala> import java.lang.invoke._
import java.lang.invoke._
scala.reflect.internal.Symbols$CyclicReference: illegal cyclic reference involving class ClassSpecializer

That entry seems to have slain the compiler.  Shall I replay
your session? I can re-run each line except the last one.
[y/n]

-Ydebug

[snip compilation of REPL objects]
[running phase jvm on <synthetic>]
import java.lang.invoke._
scala.reflect.internal.Symbols$CyclicReference: illegal cyclic reference involving class ClassSpecializer
	at scala.reflect.internal.Symbols$Symbol.$anonfun$completeInfo$3(Symbols.scala:1535)
	at scala.Function0.apply$mcV$sp(Function0.scala:39)
	at scala.reflect.internal.Symbols$Symbol.lock(Symbols.scala:582)
	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1533)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1517)
	at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2586)
	at scala.reflect.internal.tpe.FindMembers$FindMemberBase.<init>(FindMembers.scala:26)
	at scala.reflect.internal.tpe.FindMembers$FindMember.<init>(FindMembers.scala:227)
	at scala.reflect.internal.Types$Type.findMemberInternal$1(Types.scala:1033)
	at scala.reflect.internal.Types$Type.findMember(Types.scala:1035)
	at scala.reflect.internal.Types$Type.memberBasedOnName(Types.scala:667)
	at scala.reflect.internal.Types$Type.member(Types.scala:631)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:713)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$sigToType(ClassfileParser.scala:759)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$ClassTypeCompleter.complete(ClassfileParser.scala:1272)
	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1544)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1517)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1691)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:548)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.$anonfun$parse$2(ClassfileParser.scala:161)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.$anonfun$parse$1(ClassfileParser.scala:147)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:130)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:323)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.$anonfun$complete$2(SymbolLoaders.scala:230)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:228)
	at scala.reflect.internal.Symbols$Symbol.completeInfo(Symbols.scala:1544)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1517)
	at scala.reflect.internal.Symbols$Symbol.tpe_$times(Symbols.scala:1500)
	at scala.tools.nsc.interpreter.IMain.cleanTypeAfterTyper(IMain.scala:1080)
	at scala.tools.nsc.interpreter.IMain.log$1(IMain.scala:377)
	at scala.tools.nsc.interpreter.IMain.updateReplScope(IMain.scala:389)
	at scala.tools.nsc.interpreter.IMain.$anonfun$recordRequest$8(IMain.scala:412)
	at scala.tools.nsc.interpreter.IMain.$anonfun$recordRequest$7(IMain.scala:412)
	at scala.tools.nsc.interpreter.IMain.recordRequest(IMain.scala:411)
	at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$1(IMain.scala:482)
	at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:40)
	at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:37)
	at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:40)
	at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:473)
	at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$3(IMain.scala:487)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:487)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:470)
	at scala.tools.nsc.interpreter.shell.ILoop.interpretStartingWith(ILoop.scala:930)
	at scala.tools.nsc.interpreter.shell.ILoop.command(ILoop.scala:787)
	at scala.tools.nsc.interpreter.shell.ILoop.processLine(ILoop.scala:462)
	at scala.tools.nsc.interpreter.shell.ILoop.loop(ILoop.scala:485)
	at scala.tools.nsc.interpreter.shell.ILoop.run(ILoop.scala:1019)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:87)
	at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:91)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:102)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:107)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

@som-snytt som-snytt added the repl label Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.