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).
issue-#208 ASSERT(FALSE) rejected by compiler
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#208 ASSERT(FALSE) rejected by compiler
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
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
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#208 ASSERT(FALSE) rejected by compiler
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.
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
no problem,very well:the comments and documents updated correctly;