mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-06 06:20:04 +02:00
[svn r27] * Fixed bug in aggregate field lookup.
* Fixed structs with no fields. * Added support for NegExp as in -x.
This commit is contained in:
5
test/bug1.d
Normal file
5
test/bug1.d
Normal file
@@ -0,0 +1,5 @@
|
||||
module bug1;
|
||||
struct Foo { Foo opSub(ref Foo b) { return Foo(); } }
|
||||
struct Bar { Foo whee; }
|
||||
void test(ref Bar moo) { Foo nngh; auto plonk = nngh - moo.whee; }
|
||||
void main() { Bar bar; test(bar); }
|
||||
13
test/neg.d
Normal file
13
test/neg.d
Normal file
@@ -0,0 +1,13 @@
|
||||
module neg;
|
||||
|
||||
void main()
|
||||
{
|
||||
int i = 32;
|
||||
long l = 55;
|
||||
float f = 23;
|
||||
double d = 4;
|
||||
assert(-i == -32);
|
||||
assert(-l == -55);
|
||||
assert(-f == -23);
|
||||
assert(-d == -4);
|
||||
}
|
||||
Reference in New Issue
Block a user