class Foo extends scala.Dynamic // error
trait Bar extends scala.Dynamic // error
object Baz extends scala.Dynamic // error

package A {
  import scala.language.dynamics
  package B {
    import scala.language.{ dynamics => _ }
    class Foo extends scala.Dynamic // error
    trait Bar extends scala.Dynamic // error
    object Baz extends scala.Dynamic // error
  }
}

class Foo extends scala.Dynamic // error
trait Bar extends scala.Dynamic // error
object Baz extends scala.Dynamic // error

package A {
  import scala.language.dynamics
  package B {
    import scala.language.{ dynamics => _ }
    class Foo extends scala.Dynamic // error
    trait Bar extends scala.Dynamic // error
    object Baz extends scala.Dynamic // error

    package C {
      import scala.language.{ dynamics => d }
      class Foo extends scala.Dynamic // OK
    }
  }
}

Add test for renaming in hasImport
Add test for renaming in hasImport
