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

regression in typing with val overriding object

    Details

      Description

      trait D {
        trait Manifest {
          class Entry
        }
      
        val M: Manifest
      
        def m: M.Entry = ???
      }
      
      object D1 extends D {
        object M extends Manifest
      }
      
      object D2 extends D {
        val M: Manifest = ???
      }
      
      object Hello {
      
        def main(args: Array[String]) {
          // 2.10.3 - ok
          // 2.11.0-M7 - type mismatch
          val t1: D1.M.Entry = D1.m
      
          // 2.10.3 - ok
          // 2.11.0-M7 - ok
          val t2: D2.M.Entry = D2.m
        }
      }
      

        Issue Links

          Activity

          Show
          Jason Zaugg added a comment - https://github.com/retronym/scala/compare/ticket;8054?expand=1
          Hide
          Jason Zaugg added a comment -

          Regression due to the fix for SI-7928.

          Show
          Jason Zaugg added a comment - Regression due to the fix for SI-7928 .
          Show
          Jason Zaugg added a comment - https://github.com/scala/scala/pull/3241

            People

            • Assignee:
              Jason Zaugg
              Reporter:
              Jason Zaugg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development