1 ////////////////////////////////////////////////////////////////////////////////
2 // https://issues.dlang.org/show_bug.cgi?id=15478
9 static int bug() { return 0; }
17 int getLength() { return 42; }
18 struct Get
{static int length() { return 42; }}
22 static assert (is(typeof(i1
) == int[42]));
23 static assert (is(typeof(i2
) == int[42]));
26 ////////////////////////////////////////////////////////////////////////////////
27 // https://issues.dlang.org/show_bug.cgi?id=21870
30 @property size_t
count() const
36 int[S21870
.init
.count()] x
; // OK
37 int[S21870
.init
.count
] y
; // error
39 ////////////////////////////////////////////////////////////////////////////////
44 auto bug() { return 0; }
49 enum Foo15478
!int foo
= 0;
50 Foo15478
!int[foo
.bug
] bar
; // Error: integer constant expression expected instead of Foo().bug
52 enum foo_bug
= foo
.bug
;
53 Foo15478
!int[foo_bug
] baz
; // OK