Skip to content

Commit

Permalink
applied temple's fix for the ofront issue #30, endless recoursion for
Browse files Browse the repository at this point in the history
cyclic array types.
jtempl/ofront@c7d37c9
  • Loading branch information
norayr committed Aug 8, 2017
1 parent 9f3893b commit 511186f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compiler/OPC.Mod
Expand Up @@ -453,6 +453,9 @@ MODULE OPC; (* copyright (c) J. Templ 12.7.95 / 3.7.96 *)
ELSIF str^.form = OPT.Pointer THEN
IF str^.BaseTyp^.comp # OPT.Record THEN DefineType(str^.BaseTyp) END
ELSIF str^.comp IN {OPT.Array, OPT.DynArr} THEN
IF (str^.BaseTyp^.strobj # NIL) & (str^.BaseTyp^.strobj^.linkadr = ProcessingType) THEN (*cyclic base type*)
OPM.Mark(244, str^ .txtpos); str^.BaseTyp^.strobj^.linkadr := PredefinedType
END ;
DefineType(str^.BaseTyp)
ELSIF str^.form = OPT.ProcTyp THEN
IF str^.BaseTyp # OPT.notyp THEN DefineType(str^.BaseTyp) END ;
Expand Down

0 comments on commit 511186f

Please sign in to comment.