[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ICE on procedure-local CONST declaration
From: |
Gaius Mulley |
Subject: |
Re: ICE on procedure-local CONST declaration |
Date: |
Tue, 23 Jul 2024 18:41:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi Alcor,
as a followup - I've just committed another patch which detects similar
issue in the TYPE and VAR declarations. It tracks the state of
acceptable Qualident symbol kinds and issues an error with a description
of the failure context. For example:
$ cat badtype.mod
MODULE badtype ;
PROCEDURE bar (VAR a: CARDINAL) ;
TYPE
Foo = a ;
BEGIN
END bar ;
BEGIN
END badtype.
$ gm2 badtype.mod
badtype.mod:5:10: error: In procedure ‘bar’: not expecting a variable in a TYPE
block
5 | Foo = a ;
| ^
$ cat badvar.mod
MODULE badvar ;
PROCEDURE bar (VAR a: CARDINAL) ;
VAR
Foo: a ;
BEGIN
END bar ;
BEGIN
END badvar.
$ gm2 badvar.mod
badvar.mod:5:9: error: In procedure ‘bar’: not expecting a variable in a VAR
block
5 | Foo: a ;
| ^
regards,
Gaius