Allow annotations inside the head of a for...in
statement
#25605
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Unlike
element
infor (let element of iterable) {}
anderror
intry {} catch (error) {}
whereelement
anderror
are determined at run-time,key
infor (let key in object) {}
is already known to be a string at compile-time.I propose we accept an annotation for
key
. In other words, the following syntax should be valid:Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: