To Reproduce
/data get entity @s {}[]
Expected
Reports syntax error. Because if something matches a compound filter, it must be a TAG_Compound. You would never get something by using index from a TAG_Compound.
Actual
❌ No syntax error was reported.
Linked issues
Comments 5
For the same reason, [{}][] should also report a syntax error.
MC-208974 can be statically prevented if both {}[] and [{}][] become invalid syntax.
Can confirm in 20w51a.