Skip to content

Conversation

@andreasfertig
Copy link
Owner

No description provided.

In the case of an IfStmt, ForStmt or WhileStmt without braces with a
directly invoked lambda as single statement the made-up class was in
the scope of the if but the invoke of the call operator wasn't. That
way the code did not compile and was showing a wrong transformation.

The fix is to wrap _all_ these statements in curly braces, if they are
not already there. This should as a side effect help in showing why
these statements without braces can lead to human errors.
@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #388 (5ee1507) into master (b0f523a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #388      +/-   ##
==========================================
- Coverage   97.49%   97.48%   -0.01%     
==========================================
  Files          29       29              
  Lines        4226     4214      -12     
==========================================
- Hits         4120     4108      -12     
  Misses        106      106              
Flag Coverage Δ
insights-macos 97.61% <100.00%> (-0.01%) ⬇️
insights-windows 96.83% <100.00%> (-0.02%) ⬇️
ubuntu 96.97% <100.00%> (-0.68%) ⬇️
ubuntu-libcxx ?

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

Impacted Files Coverage Δ
CodeGenerator.h 99.04% <ø> (ø)
CodeGenerator.cpp 98.38% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0f523a...5ee1507. Read the comment docs.

@andreasfertig andreasfertig merged commit bea557c into master Mar 17, 2021
@andreasfertig andreasfertig deleted the fixIssue386 branch March 17, 2021 18:53
@andreasfertig andreasfertig linked an issue Mar 17, 2021 that may be closed by this pull request
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.

Incorrect code generation for IIFE inside if without parentheses

2 participants