From 5e3b2f1ff70e1dd661f0fda4f1d07c6c4a2aeb30 Mon Sep 17 00:00:00 2001 From: "Amy J. Ko" Date: Sat, 10 Feb 2024 15:04:29 -0800 Subject: [PATCH] Don't include empty names in duplicate name warnings. --- src/nodes/Bind.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nodes/Bind.ts b/src/nodes/Bind.ts index cdda69dcf..a2a02c62a 100644 --- a/src/nodes/Bind.ts +++ b/src/nodes/Bind.ts @@ -355,10 +355,12 @@ export default class Bind extends Expression { for (const [, duplicate] of this.names.names.map((name1, index1) => { return [ name1, - this.names.names.find( - (name2, index2) => - index2 > index1 && name1.isEqualTo(name2), - ), + (name1.getName() ?? '').length > 0 + ? this.names.names.find( + (name2, index2) => + index2 > index1 && name1.isEqualTo(name2), + ) + : undefined, ] as const; })) { if (duplicate) conflicts.push(new DuplicateName(this, duplicate));