Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative integer literals are compile-time constants #1836

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

majastrz
Copy link
Member

@majastrz majastrz commented Mar 12, 2021

Negative integer literals are now considered compile-time constants. This fixes #1748.

Also fixes the logic merge issue in main.

//@[11:22) [BCP032 (Error)] The value must be a compile-time constant. |length('s')|
@metadata({
bool: !true
//@[8:13) [BCP032 (Error)] The value must be a compile-time constant. |!true|
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicate errors issue was already there. Created #1835 to track.

@majastrz majastrz enabled auto-merge (squash) March 12, 2021 04:14
@codecov-io
Copy link

codecov-io commented Mar 12, 2021

Codecov Report

Merging #1836 (2e1fa6f) into main (25bb943) will increase coverage by 0.04%.
The diff coverage is 96.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1836      +/-   ##
==========================================
+ Coverage   95.06%   95.11%   +0.04%     
==========================================
  Files         371      371              
  Lines       21878    21888      +10     
  Branches       15       15              
==========================================
+ Hits        20799    20818      +19     
+ Misses       1079     1070       -9     
Flag Coverage Δ
dotnet 95.54% <96.72%> (+0.04%) ⬆️
typescript 26.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Bicep.Core.UnitTests/Parsing/ParserTests.cs 100.00% <ø> (ø)
src/Bicep.Core/Syntax/SyntaxRewriteVisitor.cs 75.94% <0.00%> (ø)
...p.LangServer/Completions/BicepCompletionContext.cs 96.57% <66.66%> (+0.76%) ⬆️
...Bicep.Core.IntegrationTests/NestedResourceTests.cs 100.00% <100.00%> (ø)
...ypeSystem/TypeValidatorCompileTimeConstantTests.cs 100.00% <100.00%> (ø)
...rc/Bicep.Core.UnitTests/Utils/TestSyntaxFactory.cs 100.00% <100.00%> (ø)
src/Bicep.Core/Parsing/Lexer.cs 98.02% <100.00%> (+0.02%) ⬆️
src/Bicep.Core/Parsing/Parser.cs 98.19% <100.00%> (ø)
src/Bicep.Core/Syntax/ResourceAccessSyntax.cs 100.00% <100.00%> (ø)
src/Bicep.Core/Syntax/SyntaxVisitor.cs 95.93% <100.00%> (ø)
... and 3 more

Copy link
Contributor

@shenglol shenglol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@majastrz majastrz merged commit 243a581 into main Mar 12, 2021
@majastrz majastrz deleted the majastrz/minus-ctc branch March 12, 2021 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation failed: int param minValue with negative int
3 participants