diff --git a/lang/m2/comp/scope.C b/lang/m2/comp/scope.C index 30c9cf769..0308a93be 100644 --- a/lang/m2/comp/scope.C +++ b/lang/m2/comp/scope.C @@ -112,6 +112,7 @@ chk_forw(pdf) while (df = *pdf) { if (df->df_kind == D_FORWTYPE) { + pdf = &df->df_nextinscope; ForceForwardTypeDef(df); /* removes df */ continue; } diff --git a/lang/m2/comp/type.c b/lang/m2/comp/type.c index 06bba2fa7..b8f89a059 100644 --- a/lang/m2/comp/type.c +++ b/lang/m2/comp/type.c @@ -725,6 +725,9 @@ ForceForwardTypeDef(df) } df = df->df_forw_def; } + while (nd->nd_class == Link) { + nd = nd->nd_RIGHT; + } df = lookfor(nd, CurrVis, 1, 0); if (! df->df_kind & (D_ERROR|D_TYPE)) { node_error(nd, "\"%s\" is not a type", df1->df_idf->id_text);