I try to check (at compile time) if an expression need to be called with a context pointer or without. E.g.: I want to tell the difference between A.foo (no context pointer needed) and A.bar. class A { static void foo() {} void bar() {} } Any ideas?