title: why does compiler "allows" static function which takes dynamic parameter to be called in the instance's context?
body: <p>probably I'm missing something but I have no idea why does compiler allows this call for static function <code>Foo</code>:</p>
  
  <pre><code>this.Foo(this.ViewBag);
  </code></pre>
  
  <p>Here is the complete code (Visual Studio 2012, brand new MVC4 project):</p>
  
  <pre><code>public class HomeController : Controller
  {
      public ActionResult Index()
      {
          this.Foo(this.ViewBag);     // will compile
          this.Foo(new object());     // will NOT compile
          this.Bar(this.ViewBag);     // will compile
          this.Bar(new object());     // will NOT compile
          return View();
      }
  
      internal static void Bar(object viewBag)
      {
  
      }
  
      internal static void Foo(dynamic viewBag)
      {
  
      }
  }
  </code></pre>
  
  <p>Of course at run time I get</p>
  
  <blockquote>
    <p>Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Member
    'HomeController.Foo(object)' cannot be accessed with an instance
    reference; qualify it with a type name instead</p>
  </blockquote>
  
  <p>is it my "bug" (most likely I don't know something about <code>dynamic</code> keyword), or compiler's bug?</p>