atom / language-c

C support in Atom
Other
118 stars 152 forks source link

C++ lambda return type parsed as variable name #342

Closed ToxicPie closed 4 years ago

ToxicPie commented 4 years ago

Description

Lambda return type in C++ is parsed as a variable name if the lambda is placed inside a scope.

Example:

image

void foo() {
    auto sum = [](int a, int b) -> int {
        return a + b;
    };
}
lkashef commented 4 years ago

Hey @ToxicPie, thanks for the report!

Could you please fill-in the template (you can copy the template by creating a new issue), the part I am most interested in is the Expected Behavior section.

I tried to check the scope for int a and it seems to match the int in lambada, knowing more about what you think the behavior should be, would be helpful.

no-response[bot] commented 4 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.