diff --git a/src/oberon.c b/src/oberon.c
index 09a6b8850c988e64986859aa3f2a73e3cd17d2ae..251a7df597c9887a7d2d319940bc99d70a812c35 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
// UTILS
// =======================================================================
-void
+static void
oberon_error(oberon_context_t * ctx, const char * fmt, ...)
{
va_list ptr;
@@ -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");
}
{
oberon_error(ctx, "module name not matched");
}
+
+ oberon_generator_fini_module(ctx -> mod);
}
// =======================================================================