From 5d5e497d22ef325a68514849c2354c2e29ff2fd1 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 5 Oct 1987 15:41:30 +0000 Subject: [PATCH] fixed a problem with procedures imported from other modules but not declared in their definition modules --- lang/m2/comp/def.c | 1 + lang/m2/comp/defmodule.c | 1 - lang/m2/comp/lookup.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/m2/comp/def.c b/lang/m2/comp/def.c index 516b6fdbb..be972ca42 100644 --- a/lang/m2/comp/def.c +++ b/lang/m2/comp/def.c @@ -74,6 +74,7 @@ MkDef(id, scope, kind) df->df_kind = kind; df->df_next = id->id_def; id->id_def = df; + if (kind == D_ERROR) df->df_type = error_type; /* enter the definition in the list of definitions in this scope */ diff --git a/lang/m2/comp/defmodule.c b/lang/m2/comp/defmodule.c index 5df8e4431..adb5e81fc 100644 --- a/lang/m2/comp/defmodule.c +++ b/lang/m2/comp/defmodule.c @@ -145,7 +145,6 @@ GetDefinitionModule(id, incr) } if (! df) { df = MkDef(id, GlobalScope, D_ERROR); - df->df_type = error_type; df->mod_vis = vis; newsc->sc_definedby = df; } diff --git a/lang/m2/comp/lookup.c b/lang/m2/comp/lookup.c index 1c589ec14..0eb38a466 100644 --- a/lang/m2/comp/lookup.c +++ b/lang/m2/comp/lookup.c @@ -83,6 +83,5 @@ lookfor(id, vis, give_error) if (give_error) id_not_declared(id); df = MkDef(id->nd_IDF, vis->sc_scope, D_ERROR); - df->df_type = error_type; return df; } -- 2.34.1