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

REPL "not a companion" warning wrongly flags class/method, class/val pairs

    Details

      Description

      
      scala> class C
      defined class C
      
      scala> def C = 0
      C: Int
      warning: previously defined class C is not a companion to method C.
      Companions must be defined together; you may wish to use :paste mode for this.
      
      scala> object D
      defined module D
      
      scala> def D = 0
      D: Int
      
      scala> class E
      defined class E
      
      scala> val E = 0
      E: Int = 0
      

        Activity

        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/1929

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development