-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in WITH statement with pointers to related type extended records #98
Comments
Thank you for raising this issue. I am thinking about this. Most probably we have a bug which needs to be fixed, but hang on, I am investigating this. It's interesting, I tried your source in OLR, and it's version of OP2 parser was not able to compile it because of different issue - the parser didn't agree with the usage of the pipe (|) symbol, though it seems to be correct Oberon-2 syntax. It said - END expected. Anyway that didn't directly relate to the actual question of using However voc is inherited from the different line - Linz's version of parser, it would be interesting to see how that compiler would behave. But I cannot, because Oberon V4 for Linux was linked to the old version of glibc (OLR doesn't use libc at all) and is not usable nowadays. Though I have a friend who revived it, extended it, and has a running copy on FreeBSD. |
Is your friend’s revived version of Oberon V4 something that is publicly available? I’d be interested… |
This problem is well known and dates back to the early releases of OP2 by Crelier Regis from the ETH. A simple workaround is to deliberately adjust the type of the supplied parameter:
|
@MarkowEduard thank you so much! @tkurtbond will that work for you till i'll fix the parser? because with my current load it'll take time. |
That will work fine! Thank you, and @MarkowEduard! |
I spoke too soon: that let the example I'd extracted from the real module compile fine, and the real module compiled fine, but it died with a HALT(-5) type guard failed. However, the phrase "and therefore the type of the procedure is changed" did lead to a workaround that does work: I introduced a variable Again, thanks @MarkowEduard and @norayr! |
Can you provide an example? |
When I compile the following program with Vishap Oberon:
I get this error:
Both of the other Oberon-2 compilers I tried with (oo2c and obc) compiled this without error, but I can't use either of them for the project from which this example is extracted (oo2c has a bug that makes the project fail, for instance).
The text was updated successfully, but these errors were encountered: