Comparision of GUID and Text results in Runtime Error (Compile Time would be better)
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
1. Describe the bug
A GUID cannot be compared with Text, but i doens't results in a compile error.
2. To Reproduce
Steps to reproduce the behavior:
- Create some Code with the following in it.
local procedure DummyGuidCheck()
var
DummyGuid: Guid;
DummyText: Text;
begin
if DummyGuid <> DummyText then;
end;
3. Expected behavior
I ecpect to receiv a Compiler Error instead of a Runtime Error
4. Actual behavior
Right now the Code above is compiling but results in a runtime error, since text and guid cannot be compared.
5. Versions:
-
AL Language:
9.0.519128(Preview Release) -
Visual Studio Code:
Version: 1.60.2 (user setup)
Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Date: 2021-09-22T12:00:31.514Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042 -
Business Central: Version: W1 20.0 (Plattform 20.0.30192.0 + Anwendung 20.0.30934.0)
Final Checklist
Please remember to do the following:
-
Search the issue repository to ensure you are reporting a new issue
-
Reproduce the issue after disabling all extensions except the AL Language extension
-
Simplify your code around the issue to better isolate the problem
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided AL snippet with the reported AL Language and Business Central versions. The work is done when comparing Guid and Text produces a compiler error instead of compiling and failing at runtime; no source file or test entry point is identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100