summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fef434e)
raw | patch | inline | side by side (parent: fef434e)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 28 Jul 2017 18:27:40 +0000 (21:27 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 28 Jul 2017 18:27:40 +0000 (21:27 +0300) |
src/oberon.c | patch | blob | history | |
src/test.c | patch | blob | history |
diff --git a/src/oberon.c b/src/oberon.c
index 89f4be48a38e95db5eb56d4f1dd59f4569f7bb8c..251a7df597c9887a7d2d319940bc99d70a812c35 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
@@ -2201,7 +2201,8 @@ oberon_prevent_recursive_pointer(oberon_context_t * ctx, oberon_type_t * type)
oberon_error(ctx, "recursive pointer declaration");
}
- if(type -> base -> class == OBERON_TYPE_POINTER)
+ if(type -> class == OBERON_TYPE_POINTER
+ && type -> base -> class == OBERON_TYPE_POINTER)
{
oberon_error(ctx, "attempt to make pointer to pointer");
}
diff --git a/src/test.c b/src/test.c
index 51a1250523aebc88646d6add7368a3c5fe5f8f48..02912bbe97ae1e523f23c91eb2027900a8c15dee 100644 (file)
--- a/src/test.c
+++ b/src/test.c
"VAR"
" g : ARRAY 4 OF INTEGER;"
" r : RECORD x : INTEGER; END;"
- " a : POINTER TO ARRAY OF ARRAY OF RecDesc;"
+ " a : POINTER TO ARRAY OF ARRAY OF Rec;"
"BEGIN"
" NEW(a, 10, 10);"
+ " NEW(a[9, 9]);"
" a[9, 9].x := 666;"
" g[3] := 4;"
" r.x := 4546;"