Inconsistency of type `int` allowing `null` in some scenarios, but not other
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Bicep version**
VSCode v0.4.1124
**Describe the bug**
The bicep language seems somewhat inconsistent as to whether it allows null. In the below example, both scenarios describe a value of type `int`, however one allows null, and one doesn't.
Assuming this is the desired behaviour
1. I'd like to see there be some difference in the type to make clear whether null is allowed. (e.g. the hover over for `capacityReservationLevel` should show the type as `int?` or `int | null` )
2. Is there a way to specify that a parameter can be a nullable int.
**To Reproduce**
`capacityReservationLevel` is described as type `int` and allows `null`

However if you have a parameter of type `int`, then null isn't allowed

Contributor guide
Research direction
Start by reproducing the two cases in VSCode v0.4.1124: the resource property's `int` value that accepts `null` and an `int` parameter that rejects it. Compare the language's type display and null validation, then verify that the accepted behavior and any nullable-type notation are consistent and covered by tests or documentation.
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