method static-ness has no effect on the type?

Cauterite via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 8 01:30:54 PDT 2016


See: https://dpaste.dzfl.pl/2ec6780d4b25

We have two methods defined, f1 and f2, where f2 is static but 
they have otherwise identical signatures.
We can see from the disassembly that f1 receives a `this` pointer 
while f2 does not.
Yet, typeof(&f1) == typeof(&f2). This makes no sense, how can the 
compiler even know whether to pass a `this` pointer when both 
methods have same type?


More information about the Digitalmars-d-learn mailing list