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

Compiling with -Ycheck:<phase> reports errors for any case class #1424

Closed
scabug opened this issue Oct 16, 2008 · 2 comments
Closed

Compiling with -Ycheck:<phase> reports errors for any case class #1424

scabug opened this issue Oct 16, 2008 · 2 comments

Comments

@scabug
Copy link

scabug commented Oct 16, 2008

When running scala -Ycheck:typer, entering

scala> case class A()

will produce the following output:

exception while typing x$$1
exception while typing A.this.eq(x$$1)
exception while typing A.this.eq(x$$1).||
<console>:4: error: **** ERROR DURING INTERNAL CHECKING ****
type mismatch;
 found   : x$$1.type (with underlying type Any)
 required: AnyRef
       case class A()
                  ^
exception while typing x$$1
exception while typing A.this.eq(x$$1)
exception while typing A.this.eq(x$$1).||
exception while typing A.this.eq(x$$1).||(x$$1 match {
  case A() => true
  case _ => false
})
exception while typing x$$1.isInstanceOf[AnyRef].&&(A.this.eq(x$$1).||(x$$1 match {
  case A() => true
  case _ => false
}))
exception while typing override def equals(x$$1: Any): Boolean = x$$1.isInstanceOf[AnyRef].&&(A.this.eq(x$$1).||(x$$1 match {
  case A() => true
  case _ => false
}))

It's not confined to the interpreter, though (happens also with scalac). Specifying other compiler phases in -Ycheck will show the same behavior.

@scabug
Copy link
Author

scabug commented Oct 16, 2008

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

@scabug
Copy link
Author

scabug commented Jun 4, 2010

@paulp said:
Let's make this a duplicate of #2577, as they fail identically.

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

No branches or pull requests

1 participant