Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5809

Spurious warning for implicit classes declared in package objects

    Details

      Description

      package scala.reflect
       
      package object api {
        implicit class PimpedExpr[T](expr: Universe # Expr[T]) {
          def runtimeEval: T = {
            println("hello, dear")
            expr.eval
          }
        }
      }
      

      Eval.scala:4: warning: it is not recommended to define classes/objects inside of package objects.
      If possible, define class PimpedExpr in package api instead.
      

        Attachments

          Activity

            People

            • Assignee:
              extempore Paul Phillips
              Reporter:
              burmako Eugene Burmako
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: