microsoft / microsoft/AL

AL0603: Implicit Conversion

Open
#5,693 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

al-core-compiler bug
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

Description
Hi, I've just downloaded the latest AL Language from docker and I've found out this warning.
I have a simple question: How can it be handled? is there some c# cast or something like that?

if MyEnum in [0, 1, 2, 5, 6] then

this will throw this warning but the enums aren't they an integer-based?
Can I do something like that (or like C#)?
if MyEnum in (Enum)[0, 1, 2, 5, 6] then

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides no repository file, test, or entry point. Reproduce the AL snippet that raises AL0603 and investigate the compiler's enum-conversion diagnostic; done means establishing and documenting the supported handling, or identifying the required compiler change.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.