Results 18 issues of Andy Hanson

I have code like: ```d int f(int x) { int y = x + 1; return y * 2; } ``` When debugging, I see `y` as a variable but...

To reproduce, put this content in `a.d`: ```d struct A { this(long[9] x_) { x = x_; } long[9] x; } extern(C) void _start() { A a = A([0, 0,...

Compiling the following program with `ldc2 -betterC -O2 --enable-asserts=false a.d` takes 14 seconds. ```d import core.stdc.stdlib : malloc; extern(C) int main() { return 0; } struct Foo { struct A...

**mod.d** ```d module mod; struct A { static struct B { int x; } } ``` **app.d** ```d import mod : A; struct A2 { static struct B2 { int...

bug
Feature Request
Sematic analysis

In the following example, `U` is not considered private: ```d private alias a = int; private int i; private void f() {} private class C {} private struct S {}...

bug

In the following example, `y` is treated as an export, even though it's a local variable like `b`. ```d import core.stdc.stdio : printf; void main() { printf("result is %d\n", foo(10));...

bug

When I upgrade to the newest LDC version, parsing breaks in many ways. Here's a simple example: ```d import core.stdc.stdio : printf; void f() {} void main() { printf("call f");...

When I run `dub run dscanner -- --styleCheck app.d` on this code, there is only a warning for the parameter passed by-value. ```d private: void f(ref int i) {} void...

Input: ```d int longFunctionName(int[] ar...) { return ar[0]; } int f(int x) { return x == 1 ? longFunctionName(x, longFunctionName(x, x)) : longFunctionName(x, longFunctionName(x, x)); } int g(int x) {...

enhancement
wrapping

Input: ```d import std.stdio : writeln; struct S { ulong x; ulong y; ulong function(ulong) f; } immutable S s = { 1111111111111111111, 1111111111111111111, (x) { return x + 1111;...

bug
indentation