changeset 127:d5b33ee318d4

New protection test
author Anders Johnsen <skabet@gmail.com>
date Sat, 21 Jun 2008 17:29:17 +0200
parents c3b24e7e8cf8
children 7264c61088c4
files tests/parser/public_2.d
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/parser/public_2.d	Sat Jun 21 17:29:17 2008 +0200
@@ -0,0 +1,15 @@
+//fail
+
+struct A
+{
+    private int b;
+    public int c;
+}
+
+
+int main()
+{
+    A a;
+    a.b = 4;
+    a.c = 5; // should fail
+}