Skip to content

[BUG] with getting a global variable #540

@YOURiSST

Description

@YOURiSST

with adding this code:

#include <iostream>
using namespace std;

int a = 3;
int main() {
    int a = 3;
    {
        int a = 4;
        {
            int a = 5;
            cout << a + (::a);
        }
    }
}

i got this:

#include <iostream>
using namespace std;

int a = 3;

int main()
{
  int a = 3;
  {
    int a = 4;
    {
      int a = 5;
      std::cout.operator<<(a + (a)); // still should be ::a
    };
  };
  return 0;
}

so, there is a bug with getting a global variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions