Page 1 of 1

issue-#208 ASSERT(FALSE) rejected by compiler

Posted: Mon Jun 15, 2020 5:07 pm
by Robert
The Language Report permits ASSERT(x) where x is a Boolean expression, so the compiler should be adjusted to match the report.
For the issue see https://redmine.blackboxframework.org/issues/208 .

Different languages in the Oberon familly have different semantics, including our current compiler behaviour.
In my opinion:
1 - Our compiler should match our language report.
2 - The other semantic alternatives do not offer sufficient advantage to justify changing our report.

So we should update our compiler. This is a minor change, as described in https://community.blackboxframework.org ... f=48&t=246 (see post dated 10-June-2020).

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Posted: Sat Jun 20, 2020 6:29 am
by Josef Templ
I do agree that ASSERT(FALSE) should not be reported by the compiler but at runtime.
If this is in line with Oberon-07 it is a good sign that it is the right choice and it eliminates a difference.

The compile time evaluation of asserts is driven by the desire to catch as many errors as possible
at compile time but it is too aggressive in this case, I think.

- Josef

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Posted: Tue Jun 23, 2020 5:33 am
by Josef Templ
I have prepared a fix as proposed by luowy.

Here is the link to the diffs: https://redmine.blackboxframework.org/p ... 83f2387960

@luowy: I have added assertfn to the documentation of the syntax tree structure in DevCPT, please check.

Re: issue-#208 ASSERT(FALSE) rejected by compiler

Posted: Wed Jun 24, 2020 6:44 am
by luowy
no problem,very well:the comments and documents updated correctly;