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

2.8.0.RC3 => 2.8.0.RC4 : override def with var broken #3560

Closed
scabug opened this issue Jun 12, 2010 · 4 comments
Closed

2.8.0.RC3 => 2.8.0.RC4 : override def with var broken #3560

scabug opened this issue Jun 12, 2010 · 4 comments

Comments

@scabug
Copy link

scabug commented Jun 12, 2010

scala> trait Foo[X] { def foo : Map[String,Foo[X]] }
defined trait Foo

scala> def f[T]() : Foo[T] = new Foo[T] { var foo = Map[String,Foo[T]]() }
f: [T]()Foo[T]

And now leads to:

<console>:6: error: object creation impossible, since method foo in trait Foo of type => Map[String,Foo[T]] is not defined
       def f[T]() : Foo[T] = new Foo[T] { var foo = Map[String,Foo[T]]() }
@scabug
Copy link
Author

scabug commented Jun 12, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3560?orig=1
Reporter: Francois Armand (fanf)

@scabug
Copy link
Author

scabug commented Jun 12, 2010

@paulp said:
Fixed formatting and trimmed summary. Easy to spot since there weren't many suspects: introduced in r22184, right here:

-              member.setFlag(PRIVATE)
-              member.privateWithin = NoSymbol
+              member.privateWithin = classDef.symbol

@scabug
Copy link
Author

scabug commented Jun 13, 2010

@odersky said:
(In r22253) Closes #3174 and #3560. Review by moors.

@scabug
Copy link
Author

scabug commented Jun 13, 2010

@odersky said:
(In r22254) Applied patch that closes #3560 and still fixes #3174.

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

1 participant