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

REPL crashes on TAB completion (2.9.0.1, Mac OS X, Java SDK 1.6) #4874

Closed
scabug opened this issue Aug 5, 2011 · 2 comments
Closed

REPL crashes on TAB completion (2.9.0.1, Mac OS X, Java SDK 1.6) #4874

scabug opened this issue Aug 5, 2011 · 2 comments
Assignees
Labels

Comments

@scabug
Copy link

@scabug scabug commented Aug 5, 2011

anonymous-class example from the website - hit x. in REPL - crash:

scala> val x = new AnyRef { def kltpzyxm = "back to the 5th dimension" }
x: java.lang.Object{def kltpzyxm: java.lang.String} = $anon$1@1387498

scala> x.java.lang.AssertionError: assertion failed: fatal: has non-class owner value x after flatten.
at scala.Predef$.assert(Predef.scala:103)
at scala.tools.nsc.symtab.Symbols$Symbol.scala$tools$nsc$symtab$Symbols$$flattenName(Symbols.scala:614)
at scala.tools.nsc.symtab.Symbols$ClassSymbol.name(Symbols.scala:2043)
at scala.tools.nsc.symtab.Symbols$ClassSymbol.name(Symbols.scala:2013)
at scala.reflect.generic.Symbols$AbsSymbol.isRefinementClass(Symbols.scala:145)
at scala.tools.nsc.symtab.Symbols$Symbol.defaultFlagMask(Symbols.scala:1711)
at scala.tools.nsc.symtab.Symbols$Symbol.defaultFlagString(Symbols.scala:1714)
at scala.tools.nsc.symtab.Symbols$Symbol.defString(Symbols.scala:1718)
at scala.tools.nsc.symtab.Scopes$Scope$$anonfun$mkString$1.apply(Scopes.scala:316)
at scala.tools.nsc.symtab.Scopes$Scope$$anonfun$mkString$1.apply(Scopes.scala:316)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:194)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:194)
at scala.collection.immutable.List.map(List.scala:45)
at scala.tools.nsc.symtab.Scopes$Scope.mkString(Scopes.scala:316)
at scala.tools.nsc.symtab.Types$CompoundType.safeToString(Types.scala:1377)
at scala.reflect.generic.Types$AbsType.toString(Types.scala:27)
at java.lang.String.valueOf(String.java:2826)
at scala.runtime.StringAdd.$plus(StringAdd.scala:16)
at scala.tools.nsc.interpreter.JLineCompletion$TypeMemberCompletion.completions(JLineCompletion.scala:118)
at scala.tools.nsc.interpreter.CompletionAware$class.completionsFor(CompletionAware.scala:68)
at scala.tools.nsc.interpreter.JLineCompletion$TypeMemberCompletion.completionsFor(JLineCompletion.scala:99)
at scala.tools.nsc.interpreter.CompletionAware$$anonfun$2.apply(CompletionAware.scala:76)
at scala.tools.nsc.interpreter.CompletionAware$$anonfun$2.apply(CompletionAware.scala:76)
at scala.Option.map(Option.scala:134)
at scala.tools.nsc.interpreter.CompletionAware$class.completionsFor(CompletionAware.scala:76)
at scala.tools.nsc.interpreter.JLineCompletion$ids$.completionsFor(JLineCompletion.scala:155)
at scala.tools.nsc.interpreter.JLineCompletion$$anonfun$topLevelFor$1.apply(JLineCompletion.scala:262)
at scala.tools.nsc.interpreter.JLineCompletion$$anonfun$topLevelFor$1.apply(JLineCompletion.scala:261)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.nsc.interpreter.JLineCompletion.topLevelFor(JLineCompletion.scala:261)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion$$anonfun$regularCompletion$1$1.apply(JLineCompletion.scala:357)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion$$anonfun$regularCompletion$1$1.apply(JLineCompletion.scala:357)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion.tryCompletion$1(JLineCompletion.scala:332)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion.regularCompletion$1(JLineCompletion.scala:357)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion$$anonfun$complete$2.apply(JLineCompletion.scala:368)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion$$anonfun$complete$2.apply(JLineCompletion.scala:368)
at scala.Option.orElse(Option.scala:219)
at scala.tools.nsc.interpreter.JLineCompletion$JLineTabCompletion.complete(JLineCompletion.scala:368)
at scala.tools.nsc.interpreter.JLineReader$$anon$1.complete(JLineReader.scala:31)
at scala.tools.jline.console.completer.ArgumentCompleter.complete(ArgumentCompleter.java:150)
at scala.tools.jline.console.ConsoleReader.complete(ConsoleReader.java:1518)
at scala.tools.jline.console.ConsoleReader.readLine(ConsoleReader.java:1291)
at scala.tools.jline.console.ConsoleReader.readLine(ConsoleReader.java:1149)
at scala.tools.nsc.interpreter.JLineReader.readOneLine(JLineReader.scala:70)
at scala.tools.nsc.interpreter.InteractiveReader$$anonfun$readLine$2.apply(InteractiveReader.scala:43)
at scala.tools.nsc.interpreter.InteractiveReader$$anonfun$readLine$2.apply(InteractiveReader.scala:43)
at scala.tools.nsc.interpreter.InteractiveReader$.restartSysCalls(InteractiveReader.scala:50)
at scala.tools.nsc.interpreter.InteractiveReader$class.readLine(InteractiveReader.scala:43)
at scala.tools.nsc.interpreter.JLineReader.readLine(JLineReader.scala:17)
at scala.tools.nsc.interpreter.ILoop.readOneLine$1(ILoop.scala:548)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:560)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:827)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:67)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

The repl compiler has crashed spectacularly.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 5, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4874?orig=1
Reporter: Thomas J. Schrader (laborator)

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 10, 2011

Commit Message Bot (anonymous) said:
(extempore in r25486) Turned up the defense against compiler exceptions in the repl.
And gave in and disabled an assertion I should have disabled two
years ago. Closes #4874, no review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.