Difference between revisions of "Random DMD Facts"
UplinkCoder (talk | contribs) (→Random DMD Facts.) |
UplinkCoder (talk | contribs) |
||
Line 5: | Line 5: | ||
(Which may be outdated by the time of reading) | (Which may be outdated by the time of reading) | ||
− | 1) Detecting a | + | 1) Detecting a default initialization of a class: |
class C {}; auto c = new C() | class C {}; auto c = new C() | ||
Will be represented as a `NewExp` | Will be represented as a `NewExp` | ||
To get the function that is being called you need to look at the member `member` | To get the function that is being called you need to look at the member `member` | ||
− | If that `FuncDeclaration` is null, | + | If that `FuncDeclaration` is null, that is a default initialization. |
Revision as of 21:18, 8 June 2020
Random DMD Facts.
I've decided to document everything here that I come across. On this page you'll see a truly random assortment of facts about DMD Internals. (Which may be outdated by the time of reading)
1) Detecting a default initialization of a class:
class C {}; auto c = new C()
Will be represented as a `NewExp` To get the function that is being called you need to look at the member `member` If that `FuncDeclaration` is null, that is a default initialization.