Shouldn’t compiler took a function (a) instead a class member (A::a)?
No; the member definition is in the class scope, so unqualified lookup of a
gives the member.
Can you give any reference to C++ specification where it is explained?
Class scope is defined in C++11 3.3.7; in particular:
The potential scope of a declaration that extends to or past the end of a class definition also extends to the regions defined by its member definitions, even if the members are defined lexically outside the class (this includes static data member definitions)