[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:
Tomas Lindquist Olsen
2007-10-04 09:24:15 +02:00
parent 0ba16ebb39
commit 53038b0f5e
5 changed files with 67 additions and 9 deletions

5
test/bug1.d Normal file
View 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
View 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);
}