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

Predef$Triple$ crashes the compiler #7251

Closed
scabug opened this issue Mar 13, 2013 · 8 comments
Closed

Predef$Triple$ crashes the compiler #7251

scabug opened this issue Mar 13, 2013 · 8 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 13, 2013

Last login: Wed Mar 13 20:43:02 on ttys001
20:52 ~$ 210x
20:52 ~/Projects/210x (2.10.x)$ scala
Welcome to Scala version 2.10.2-20130301-114301-5d54cf9e37 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_43).
Type in expressions to have them evaluated.
Type :help for more information.

scala> Predef$Triple$
error: uncaught exception during compilation: java.lang.AssertionError
java.lang.AssertionError: assertion failed:
     while compiling: <console>
        during phase: global=typer, atPhase=namer
     library version: version 2.10.2-20130301-114301-5d54cf9e37
    compiler version: version 2.10.2-20130301-114301-5d54cf9e37
  reconstructed args: -language:experimental.macros

  last tree to typer: Ident(Predef$Triple$)
              symbol: <none> (flags: )
   symbol definition: <none>
       symbol owners:
      context owners: value res0 -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $iw -> object $read -> package $line4

== Enclosing template or block ==

Template( // val <local $iw>: <notype>
  "java.lang.Object" // parents
  ValDef(
    private
    "_"
    <tpt>
    <empty>
  )
  // 2 statements
  DefDef( // def <init>: <?>
    <method>
    "<init>"
    []
    List(Nil)
    <tpt>
    Block(
      Apply(
        super."<init>"
        Nil
      )
      ()
    )
  )
  ValDef( // private[this] val res0: <?>
    private <local> <locked>
    "res0"
    <tpt>
    "Predef$Triple$"
  )
)

(scala.Predef$Triple$,scala.Predef,Triple$,class Predef in package scala) /  while parsing (/Users/xeno_by/Projects/210x/build/quick/classes/library/scala/Predef$Triple$.class,Some(object Predef$Triple$))class Predef.Triple$ linkedModule: object PredefScope{
  object Ensuring;
  object ArrowAssoc;
  object DummyImplicit;
  class DummyImplicit extends ;
  object =:=;
  final private[this] val singleton_=:=: <?>;
  sealed abstract class =:= extends ;
  implicit def conforms[A]: <:<[A,A];
  final private[this] val singleton_<:<: <?>;
  sealed abstract class <:<[-From, +To] extends From => To with Serializable;
  private[this] val StringCanBuildFrom: <?>;
  implicit val StringCanBuildFrom: scala.collection.generic.CanBuildFrom[String,Char,String];
  def stringCanBuildFrom: scala.collection.generic.CanBuildFrom[String,Char,String];
  implicit def unaugmentString(x: scala.collection.immutable.StringOps): String;
  implicit def any2stringadd(x: Any): scala.runtime.StringAdd;
  implicit def augmentString(x: String): scala.collection.immutable.StringOps;
  implicit def any2stringfmt(x: Any): scala.runtime.StringFormat;
  implicit def Boolean2boolean(x: Boolean): Boolean;
  implicit def Double2double(x: Double): Double;
  implicit def Float2float(x: Float): Float;
  implicit def Long2long(x: Long): Long;
  implicit def Integer2int(x: Integer): Int;
  implicit def Character2char(x: Character): Char;
  implicit def Short2short(x: Short): Short;
  implicit def Byte2byte(x: Byte): Byte;
  implicit def boolean2BooleanConflict(x: Boolean): Object;
  implicit def double2DoubleConflict(x: Double): Object;
  implicit def float2FloatConflict(x: Float): Object;
  implicit def long2LongConflict(x: Long): Object;
  implicit def int2IntegerConflict(x: Int): Object;
  implicit def char2CharacterConflict(x: Char): Object;
  implicit def short2ShortConflict(x: Short): Object;
  implicit def byte2ByteConflict(x: Byte): Object;
  implicit def boolean2Boolean(x: Boolean): Boolean;
  implicit def double2Double(x: Double): Double;
  implicit def float2Float(x: Float): Float;
  implicit def long2Long(x: Long): Long;
  implicit def int2Integer(x: Int): Integer;
  implicit def char2Character(x: Char): Character;
  implicit def short2Short(x: Short): Short;
  implicit def byte2Byte(x: Byte): Byte;
  def float2double(x: Float): Double;
  def long2double(x: Long): Double;
  def long2float(x: Long): Float;
  def int2double(x: Int): Double;
  def int2float(x: Int): Float;
  def int2long(x: Int): Long;
  def char2double(x: Char): Double;
  def char2float(x: Char): Float;
  def char2long(x: Char): Long;
  def char2int(x: Char): Int;
  def short2double(x: Short): Double;
  def short2float(x: Short): Float;
  def short2long(x: Short): Long;
  def short2int(x: Short): Int;
  def byte2double(x: Byte): Double;
  def byte2float(x: Byte): Float;
  def byte2long(x: Byte): Long;
  def byte2int(x: Byte): Int;
  def byte2short(x: Byte): Short;
  implicit def unitArrayOps(xs: Array[Unit]): scala.collection.mutable.ArrayOps[Unit];
  implicit def shortArrayOps(xs: Array[Short]): scala.collection.mutable.ArrayOps[Short];
  implicit def refArrayOps[T <: AnyRef](xs: Array[T]): scala.collection.mutable.ArrayOps[T];
  implicit def longArrayOps(xs: Array[Long]): scala.collection.mutable.ArrayOps[Long];
  implicit def intArrayOps(xs: Array[Int]): scala.collection.mutable.ArrayOps[Int];
  implicit def floatArrayOps(xs: Array[Float]): scala.collection.mutable.ArrayOps[Float];
  implicit def doubleArrayOps(xs: Array[Double]): scala.collection.mutable.ArrayOps[Double];
  implicit def charArrayOps(xs: Array[Char]): scala.collection.mutable.ArrayOps[Char];
  implicit def byteArrayOps(xs: Array[Byte]): scala.collection.mutable.ArrayOps[Byte];
  implicit def booleanArrayOps(xs: Array[Boolean]): scala.collection.mutable.ArrayOps[Boolean];
  implicit def genericArrayOps[T](xs: Array[T]): scala.collection.mutable.ArrayOps[T];
  implicit def arrayToCharSequence(xs: Array[Char]): CharSequence;
  implicit def seqToCharSequence(xs: IndexedSeq[Char]): CharSequence;
  implicit def tuple3ToZippedOps[T1, T2, T3](x: (T1, T2, T3)): runtime.Tuple3Zipped.Ops[T1,T2,T3];
  implicit def tuple2ToZippedOps[T1, T2](x: (T1, T2)): runtime.Tuple2Zipped.Ops[T1,T2];
  implicit def exceptionWrapper(exc: Throwable): scala.runtime.RichException;
  def readf3(format: String): (Any, Any, Any);
  def readf2(format: String): (Any, Any);
  def readf1(format: String): Any;
  def readf(format: String): List[Any];
  def readDouble(): Double;
  def readFloat(): Float;
  def readLong(): Long;
  def readInt(): Int;
  def readChar(): Char;
  def readShort(): Short;
  def readByte(): Byte;
  def readBoolean(): Boolean;
  def readLine(text: String,args: Any*): String;
  def readLine(): String;
  def printf(text: String,xs: Any*): Unit;
  def println(x: Any): Unit;
  def println(): Unit;
  def print(x: Any): Unit;
  implicit def any2ArrowAssoc[A](x: A): ArrowAssoc[A];
  final class ArrowAssoc[A] extends AnyVal;
  object Triple;
  type Triple = <?>;
  object Pair;
  type Pair = <?>;
  def ???: Nothing;
  implicit def any2Ensuring[A](x: A): Ensuring[A];
  final class Ensuring[A] extends AnyVal;
  final def require(requirement: Boolean,message: => Any): Unit;
  def require(requirement: Boolean): Unit;
  final def assume(assumption: Boolean,message: => Any): Unit;
  def assume(assumption: Boolean): Unit;
  final def assert(assertion: Boolean,message: => Any): Unit;
  def assert(assertion: Boolean): Unit;
  def format(text: String,xs: Any*): String;
  def exit(status: Int): Nothing;
  def exit(): Nothing;
  def error(message: String): Nothing;
  private[this] val $scope: <?>;
  val $scope: xml.TopScope.type;
  def locally[T](x: T): T;
  def implicitly[T](implicit e: T): T;
  def identity[A](x: A): A;
  def optManifest[T](implicit m: OptManifest[T]): OptManifest[T];
  def classManifest[T](implicit m: ClassManifest[T]): ClassManifest[T];
  def manifest[T](implicit m: Manifest[T]): Manifest[T];
  private[this] val NoManifest: <?>;
  val NoManifest: reflect.NoManifest.type;
  private[this] val Manifest: <?>;
  val Manifest: scala.reflect.ManifestFactory.type;
  private[this] val ClassManifest: <?>;
  val ClassManifest: scala.reflect.ClassManifestFactory.type;
  type Manifest[T <: <?>] = scala.reflect.Manifest[T];
  type OptManifest[T <: <?>] = scala.reflect.OptManifest[T];
  type ClassManifest[T <: <?>] = reflect.ClassManifest[T];
  private[this] val Set: <?>;
  val Set: scala.collection.immutable.Set.type;
  private[this] val Map: <?>;
  val Map: scala.collection.immutable.Map.type;
  type Set[A <: <?>] = scala.collection.immutable.Set[A];
  type Map[A <: <?>, +B <: <?>] = scala.collection.immutable.Map[A,B];
  type Function = <?>;
  type String = String;
  type Class[T <: <?>] = Class[T];
  def classOf[T]: Class[T];
  def <init>(): type;
  implicit def fallbackStringCanBuildFrom[T]: scala.collection.generic.CanBuildFrom[String,T,scala.collection.immutable.IndexedSeq[T]];
  implicit def unwrapString(ws: scala.collection.immutable.WrappedString): String;
  implicit def wrapString(s: String): scala.collection.immutable.WrappedString;
  implicit def wrapUnitArray(xs: Array[Unit]): scala.collection.mutable.WrappedArray[Unit];
  implicit def wrapBooleanArray(xs: Array[Boolean]): scala.collection.mutable.WrappedArray[Boolean];
  implicit def wrapShortArray(xs: Array[Short]): scala.collection.mutable.WrappedArray[Short];
  implicit def wrapByteArray(xs: Array[Byte]): scala.collection.mutable.WrappedArray[Byte];
  implicit def wrapCharArray(xs: Array[Char]): scala.collection.mutable.WrappedArray[Char];
  implicit def wrapFloatArray(xs: Array[Float]): scala.collection.mutable.WrappedArray[Float];
  implicit def wrapLongArray(xs: Array[Long]): scala.collection.mutable.WrappedArray[Long];
  implicit def wrapDoubleArray(xs: Array[Double]): scala.collection.mutable.WrappedArray[Double];
  implicit def wrapIntArray(xs: Array[Int]): scala.collection.mutable.WrappedArray[Int];
  implicit def wrapRefArray[T <: AnyRef](xs: Array[T]): scala.collection.mutable.WrappedArray[T];
  implicit def genericWrapArray[T](xs: Array[T]): scala.collection.mutable.WrappedArray[T];
  implicit def Boolean2booleanNullConflict(x: Null): Boolean;
  implicit def Double2doubleNullConflict(x: Null): Double;
  implicit def Float2floatNullConflict(x: Null): Float;
  implicit def Long2longNullConflict(x: Null): Long;
  implicit def Integer2intNullConflict(x: Null): Int;
  implicit def Character2charNullConflict(x: Null): Char;
  implicit def Short2shortNullConflict(x: Null): Short;
  implicit def Byte2byteNullConflict(x: Null): Byte;
  implicit def booleanWrapper(x: Boolean): scala.runtime.RichBoolean;
  implicit def doubleWrapper(x: Double): scala.runtime.RichDouble;
  implicit def floatWrapper(x: Float): scala.runtime.RichFloat;
  implicit def longWrapper(x: Long): scala.runtime.RichLong;
  implicit def charWrapper(c: Char): scala.runtime.RichChar;
  implicit def intWrapper(x: Int): scala.runtime.RichInt;
  implicit def shortWrapper(x: Short): scala.runtime.RichShort;
  implicit def byteWrapper(x: Byte): scala.runtime.RichByte;
  final def $asInstanceOf[T0](): T0;
  final def $isInstanceOf[T0](): Boolean;
  final def synchronized[T0](x$1: T0): T0;
  final def ##(): Int;
  final def !=(x$1: AnyRef): Boolean;
  final def ==(x$1: AnyRef): Boolean;
  final def ne(x$1: AnyRef): Boolean;
  final def eq(x$1: AnyRef): Boolean;
  protected[package lang] def finalize(): Unit;
  final def wait(): Unit;
  final def wait(x$1: Long,x$2: Int): Unit;
  final def wait(x$1: Long): Unit;
  final def notifyAll(): Unit;
  final def notify(): Unit;
  def toString(): String;
  protected[package lang] def clone(): Object;
  def equals(x$1: Any): Boolean;
  def hashCode(): Int;
  final def getClass(): Class[_];
  final def asInstanceOf[T0]: T0;
  final def isInstanceOf[T0]: Boolean;
  final def !=(x$1: Any): Boolean;
  final def ==(x$1: Any): Boolean
}
	at scala.Predef$.assert(Predef.scala:179)
	at scala.tools.nsc.Global.assert(Global.scala:239)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1217)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1231)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:755)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$sigToType(ClassfileParser.scala:838)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getType(ClassfileParser.scala:334)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getType(ClassfileParser.scala:331)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseField(ClassfileParser.scala:607)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$scala$tools$nsc$symtab$classfile$ClassfileParser$$queueLoad$1$1.apply$mcVI$sp(ClassfileParser.scala:563)
	at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$queueLoad$1(ClassfileParser.scala:563)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parseClass$1.apply$mcV$sp(ClassfileParser.scala:575)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:580)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply$mcV$sp(ClassfileParser.scala:105)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$parse$1.apply(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.pushBusy(ClassfileParser.scala:81)
	at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:94)
	at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:254)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:187)
	at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.load(SymbolLoaders.scala:203)
	at scala.reflect.internal.Symbols$Symbol.exists(Symbols.scala:891)
	at scala.tools.nsc.typechecker.Typers$Typer.typedIdent$2(Typers.scala:5044)
	at scala.tools.nsc.typechecker.Typers$Typer.typedIdentOrWildcard$1(Typers.scala:5198)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5543)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5697)
	at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:5781)
	at scala.tools.nsc.typechecker.Namers$Namer.assignTypeToTree(Namers.scala:828)
	at scala.tools.nsc.typechecker.Namers$Namer.valDefSig(Namers.scala:1309)
	at scala.tools.nsc.typechecker.Namers$Namer.getSig$1(Namers.scala:1450)
	at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1459)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply$mcV$sp(Namers.scala:725)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1$$anonfun$apply$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$LogTransitions.apply(Namers.scala:1483)
	at scala.tools.nsc.typechecker.Namers$Namer.scala$tools$nsc$typechecker$Namers$Namer$$logAndValidate(Namers.scala:1492)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:724)
	at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$monoTypeCompleter$1.apply(Namers.scala:723)
	at scala.tools.nsc.typechecker.Namers$$anon$1.completeImpl(Namers.scala:1607)
	at scala.tools.nsc.typechecker.Namers$LockingTypeCompleter$class.complete(Namers.scala:1615)
	at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1605)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1229)
	at scala.reflect.internal.Symbols$Symbol.initialize(Symbols.scala:1365)
	at scala.tools.nsc.typechecker.MethodSynthesis$MethodSynth$class.addDerivedTrees(MethodSynthesis.scala:225)
	at scala.tools.nsc.typechecker.Namers$Namer.addDerivedTrees(Namers.scala:55)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1905)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$33.apply(Typers.scala:1905)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1844)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$rewrappingWrapperTrees$1.apply(Typers.scala:1841)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
	at scala.collection.immutable.List.foreach(List.scala:318)
	at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
	at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1905)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1907)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$29.apply(Typers.scala:1790)
	at scala.tools.nsc.typechecker.Typers$Typer.typerReportAnyContextErrors(Typers.scala:505)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1789)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5565)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2914)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$62.apply(Typers.scala:3018)
	at scala.collection.immutable.List.loop$1(List.scala:170)
	at scala.collection.immutable.List.mapConserve(List.scala:186)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:3018)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5281)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5568)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5623)
	at scala.tools.nsc.interpreter.ReplGlobal$$anon$1$$anon$2.typed(ReplGlobal.scala:29)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5680)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:99)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:464)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:91)
	at scala.collection.Iterator$class.foreach(Iterator.scala:727)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:91)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:428)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:801)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:761)
	at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:936)
	at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:931)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:603)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568)
	at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:745)
	at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:790)
	at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:702)
	at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:566)
	at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:573)
	at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:576)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:867)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:822)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:822)
	at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
	at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:822)
	at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:83)
	at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:96)
	at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:105)
	at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

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]
@scabug
Copy link
Author

scabug commented Mar 13, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7251?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.1-RC3, 2.11.0-M1

@scabug
Copy link
Author

scabug commented Mar 13, 2013

@retronym said:
Usually use of '$' in user code is treated as not-a-bug.

@scabug
Copy link
Author

scabug commented Mar 13, 2013

@Blaisorblade said:
Jason, what you say makes a lot of sense, but

  1. compilers are never supposed to crash, just to report errors
  2. also, the ScalaReference explicitly says that '$' counts as an uppercase letter.

Still, the parser could reject such identifiers, starting from 2.11, couldn't it? If they are actually unsupported, do not work and are not used, that should be OK.

@scabug
Copy link
Author

scabug commented Mar 13, 2013

@retronym said (edited on Mar 13, 2013 10:01:39 PM UTC):
It's something of a grey area, I don't think we can outlaw them so easily.

The spec mentions:

The ‘$’ character is reserved for compiler-synthesized identifiers. User programs should not define identifiers which contain ‘$’ characters.

@scabug
Copy link
Author

scabug commented Mar 13, 2013

@Blaisorblade said:
I would like some consistency, since a crash is (IMHO) never a valid answer.

It can make sense to give such a bug a low priority, but I'd say it's still a bug, because referring to identifiers with '$' must be allowed, as I'm going to explain.

First, "'$' is reserved" means that it must not be used, not that it shouldn't be used. Also, "should" in a language spec reminds me of "undefined behavior" from C, something which Java removed from the world.

Truth is, '$' is allowed by the JLS, so interoperability forces us to support using it. Still, one could forbid using it in definitions (and change the spec), and allow it in references. I suspect those could be distinguished at parse time.

Quoting from http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8:

"The "Java letters" include uppercase and lowercase ASCII Latin letters A-Z (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $ character should be used only in mechanically generated source code or, rarely, to access pre-existing names on legacy systems."

The theoretical problem is that then one can't write a trait/class/object implementing the following Java interface:

interface Foo {
  void can$tOverrideMe();
}

But I suspect that no such published interface exists.

@scabug
Copy link
Author

scabug commented Mar 14, 2013

@paulp said:
scala/scala#2258

@scabug
Copy link
Author

scabug commented Mar 23, 2013

@paulp said:
ed45b711e6

@scabug
Copy link
Author

scabug commented Mar 24, 2013

@retronym said:
Assuming this should be closed, marking fix-version as 2.11.0-M3.

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

No branches or pull requests

2 participants