Open NKarolak opened 10 months ago
This looks like it has been overlooked, @BazookaMusic - can you help/forward?
@NKarolak Oops, thanks for the ping!We should triage this. It should either fail compilation or we should make it work.
Just FYI, related standard issue but in AL code https://github.com/microsoft/BCApps/pull/444
Just to highlight here; 0T
and 00T
are different valid values, neither should fail compilation as the values format to an empty string and midnight respectively. Noticing that the constant NULL time should not be used in a subtraction would be a nice Codecop error though.
1. Describe the bug When using
0T
for time calculations, a compile error is missing to avoid a runtime error in BC.2. To Reproduce Steps to reproduce the behavior:
Write this code - it does not raise a warning or error:
But when we run it in the client, we get the following runtime error:
Why date, I don't know ... this is something for the platform team ;-)
However, the correct code would have been:
3. Expected behavior Raise a compiler error on calculating with 0T. The error should instruct to use
000000T
instead.4. Actual behavior No warning or error.
5. Versions: