Skip to content

[Question] Can function names and variable names be identical in different scope? #16

@DarkSharpness

Description

@DarkSharpness

Here's an example, which works well in C++.

struct test {};
int test() {}
int main() {
    int test;
}

Please clarify III.13.7 ”函数名和变量名不允许重复“ with more details, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions