Skip to content

IIFE in init statement produces redefinition error | clang bug #54913

@alyanser

Description

@alyanser
for(int x = []{ int x{}; return x; }();;); // error: redefinition of 'x' 

int x = []{ int x{}; return x; }(); // ok as expected

live example : https://godbolt.org/z/oo5qvM35x

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"rejects-valid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions