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

Regression: Companions must be defined in same file #5422

Closed
scabug opened this issue Jan 30, 2012 · 2 comments
Closed

Regression: Companions must be defined in same file #5422

scabug opened this issue Jan 30, 2012 · 2 comments

Comments

@scabug
Copy link

scabug commented Jan 30, 2012

Given the two source files Direction.scala

package com.google.android.divideandconquer

object Direction extends Enumeration {
  val Vertical, Horizontal = Value
}

and package.scala

package com.google.android

package object divideandconquer {
  type Direction = Direction.Value
}

Scala 2.9.1.final just compiles fine BUT Scala 2.10.0-M1 generates the following error message:

Direction.scala:3: error: Companions 'type Direction' and 'object Direction' must be defined in same file: [..]
@scabug
Copy link
Author

scabug commented Jan 30, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5422?orig=1
Reporter: @michelou
Affected Versions: 2.10.0-M1
Duplicates #5031

@scabug
Copy link
Author

scabug commented Jan 30, 2012

@retronym said:
Marking as a duplicate of #5031

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