On Friday, 1 September 2023 at 13:17:08 UTC, confused wrote:
On Friday, 1 September 2023 at 08:19:55 UTC, Richard (Rikki) Andrew Cattermole wrote:
``size_t`` is defined in ``object.d`` which is implicitly imported into all modules.

If it cannot be found, one of three things is happening:

1) You have messed with some cli args related to picking druntime/phobos
2) You have defined a module called object.
3) You have a broken compiler install.

I have in fact defined a module called ``` object ```. How is that related to this error?


It is shadowing default implicit "import object;", here a demonstration

```d
// this example shows default implicit import of "object" module
// compile this example:
//   ldc2 -c test.d
// output:
//   tuple("object", "core", "main", "thisModule")

// just a random import
import core.stdc.stdio;

void main() { }

alias thisModule = __traits(parent, main);
pragma(msg, __traits(allMembers, thisModule)); // has implicitly imported 'object' module
```

  • I don't understa... confused via Digitalmars-d-learn
    • Re: I don't... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: I d... confused via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... confused via Digitalmars-d-learn
            • ... bachmeier via Digitalmars-d-learn
              • ... confused via Digitalmars-d-learn
                • ... bachmeier via Digitalmars-d-learn
            • ... evilrat via Digitalmars-d-learn
              • ... confused via Digitalmars-d-learn
                • ... Jonathan M Davis via Digitalmars-d-learn
                • ... confused via Digitalmars-d-learn
                • ... evilrat via Digitalmars-d-learn
                • ... rempas via Digitalmars-d-learn
            • ... ryuukk_ via Digitalmars-d-learn
              • ... confused via Digitalmars-d-learn
                • ... evilrat via Digitalmars-d-learn

Reply via email to