dmd
dmd copied to clipboard
dmd D Programming Language compiler
```d struct S { int x; } void test() { auto s = S( y: 1 ); } ``` Output: ``` test.d(6): Error: `y` is not a member of `S`...
If you use ImportC to generate a .di file, you get a huge number of implementation macros that start with two underscores. Identifiers starting with two underscores are reserved by...
From kdevel here: https://forum.dlang.org/thread/[email protected] ``` $ cat dmdcrash20250417.d void main () { cast (ubyte []) [x""]; } $ dmd --version DMD64 D Compiler v2.110.0 Copyright (C) 1999-2024 by The D...
```d enum E { one, two } void main() { auto x = E . three; } ``` Output: ``` test.d(6): Error: no property `three` for type `E` test.d(1): enum...
```d int[unknown] values = [1, 2, 3]; ``` Compiler output: ``` test.d(1): Error: undefined identifier `unknown` test.d(1): Error: cannot use array to initialize `_error_` ``` The second error is redundant,...
Adds a lowering field to `ArrayLiteralExp`, and builds on https://github.com/dlang/dmd/pull/21058 to set the `.lowering` in NOGCVisitor. At some point `checkGC` and `nogc.d` should be renamed to `gcSemantic` or something, but...
```d import core.memory : pureMalloc, pureFree; struct S { @("mallocd") ubyte[] p; this() @disable; this(this) @disable; this(ubyte[] p) pure @nogc @trusted nothrow { this.p = p; } this(S rhs) pure...
Bring it up to speed, incl. simplifications and increased coverage. * Windows: * Test VS 2022 too, not just VS 2019. * Test 32-bit too, for each VS version. *...
As pointed out by @Geod24, there’s a few more things we might want to update as well: Not sure whether this works as is as Ubuntu is no longer packaging...
DMD 2.111.0: ```d alias Seq(T...)=T; struct T1{ int x; alias y=x; alias expand=Seq!x; } struct T2{ int _x; @property x()=>_x; alias y=x; alias expand=Seq!x; } void main(){ auto t1=T1(1); assert(t1.y==1);...