diff --git a/src/oberon.c b/src/oberon.c
index 58823246bde98fb0e9ebedd171d7fe24e85659c4..04eaf8c8fd29e32e6b5318db2981e64d2a02b2cd 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
@@ -2631,9 +2631,8 @@ oberon_field_list(oberon_context_t * ctx, oberon_type_t * rec, oberon_scope_t *
static void
oberon_type_record_body(oberon_context_t * ctx, oberon_type_t * rec)
{
static void
oberon_type_record_body(oberon_context_t * ctx, oberon_type_t * rec)
{
- oberon_scope_t * modscope = ctx -> mod -> decl;
oberon_scope_t * oldscope = ctx -> decl;
oberon_scope_t * oldscope = ctx -> decl;
- ctx -> decl = modscope;
+ ctx -> decl = oldscope;
if(ctx -> token == LPAREN)
{
if(ctx -> token == LPAREN)
{
this_scope -> parent = NULL;
this_scope -> parent_type = rec;
this_scope -> parent = NULL;
this_scope -> parent_type = rec;
- oberon_field_list(ctx, rec, modscope);
+ oberon_field_list(ctx, rec, oldscope);
while(ctx -> token == SEMICOLON)
{
oberon_assert_token(ctx, SEMICOLON);
while(ctx -> token == SEMICOLON)
{
oberon_assert_token(ctx, SEMICOLON);
- oberon_field_list(ctx, rec, modscope);
+ oberon_field_list(ctx, rec, oldscope);
}
rec -> scope = this_scope;
}
rec -> scope = this_scope;