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");
}