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

specialized member of value class: crash #5853

Closed
scabug opened this issue May 29, 2012 · 2 comments
Closed

specialized member of value class: crash #5853

scabug opened this issue May 29, 2012 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented May 29, 2012

object Bippy {
  implicit final class C(val x: Int) extends AnyVal {
    def +++[@specialized T](y: T) = ()
  }
  def f = 1 +++ 2
}

$plus$plus$plus$mIc$sp not found in class C's decls: Scope{
  val x: Int;
  private[this] val x: Int;
  def <init>(x: Int): Bippy.C;
  def +++[T](y: T): Unit;
  override def hashCode(): Int;
  override def equals(x$1: Any): Boolean
}
	at scala.Predef$.assert(Predef.scala:182)
	at scala.tools.nsc.Global.assert(Global.scala:213)
	at scala.tools.nsc.transform.ExtensionMethods.scala$tools$nsc$transform$ExtensionMethods$$extensionNames(ExtensionMethods.scala:65)
	at scala.tools.nsc.transform.ExtensionMethods$$anonfun$extensionMethod$1.apply(ExtensionMethods.scala:74)
	at scala.tools.nsc.transform.ExtensionMethods$$anonfun$extensionMethod$1.apply(ExtensionMethods.scala:72)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:185)
@scabug
Copy link
Author

scabug commented May 29, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5853?orig=1
Reporter: @paulp

@scabug
Copy link
Author

scabug commented May 30, 2012

@axel22 said:
Didn't look into internals of extension methods before, but unless someone knows what the fix is exactly, I can take a look at this one.

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