4
See also
https://github.com/microsoft/AL/issues/6438
https://github.com/microsoft/AL/issues/6525 (closed, but see my follow-up comment)

See screenshot:
https://user-images.githubusercontent.com/63455896/110925501-2dc25c00-831b-11eb-9c8c-c82046202ebd.png

None of these should compile. But they do, and we only get told at runtime that someone goofed.

I get that the base `Page` object takes generic `var Record: Table` arguments, so at the base level those can't be validated - but it is hopefully possible for specific Pages, which have a specific SourceTable set, to error out if they are passed a Table that is not of the same type.

Please can you consider doing this? It would catch common thinkos and save much time.

I might've missed some methods taking `Record: Table` arguments from my example, in which case, please include all such methods in this fix.
Category: Development
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future.

Best regards,
Business Central Team

Comments

D

Also see https://github.com/StefanMaron/BusinessCentral.LinterCop/discussions/16

Category: Development