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

local object with same name as object nested in class fails to type check #6712

Closed
scabug opened this issue Nov 25, 2012 · 3 comments
Closed

local object with same name as object nested in class fails to type check #6712

scabug opened this issue Nov 25, 2012 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Nov 25, 2012

class H { object O; def foo() { object O } }
[info] v2.10.0-M1 => /Users/jason/usr/scala-v2.10.0-M1-0-g58cb15c
/Users/jason/code/scala/test.scala:1: error: type mismatch;
 found   : object H.this.O
 required: object O
class H { object O; def foo() { object O } }
                              ^

This is a regression from 2.9.2

@scabug
Copy link
Author

@scabug scabug commented Nov 25, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6712?orig=1
Reporter: @retronym
Affected Versions: 2.10.0-M1, 2.10.0-RC2

@scabug
Copy link
Author

@scabug scabug commented Nov 25, 2012

@paulp said:
Regressed in scala/scala@8987550

commit 898755056642cc3771d33260295f1f51cabc6513
Author: Paul Phillips <paulp@improving.org>
Date:   1 year, 2 months ago

    Fix bug in ModuleDef elimination.
    
    Fixes corner case diagnosed by miguel. Closes SI-5012, no review.

@scabug
Copy link
Author

@scabug scabug commented Nov 25, 2012

@scabug scabug closed this Dec 10, 2012
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants