Scala Programming Language
  1. Scala Programming Language
  2. SI-6712

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0-M1, Scala 2.10.0-RC2
    • Fix Version/s: Scala 2.10.1
    • Component/s: Misc Compiler
    • Labels:

      Description

      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

        Activity

        Hide
        Paul Phillips added a comment -

        Regressed in https://github.com/scala/scala/commit/898755056

        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.
        
        Show
        Paul Phillips added a comment - Regressed in https://github.com/scala/scala/commit/898755056 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.
        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1670

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Jason Zaugg
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development