Skip to content

Commit 179d53e

Browse files
committed
doh
1 parent 267f247 commit 179d53e

File tree

1 file changed

+4
-1
lines changed
  • packages/svelte/src/compiler/phases/2-analyze/visitors

1 file changed

+4
-1
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function ClassBody(node, context) {
7676
fields.set(key, ['prop']);
7777
continue;
7878
}
79-
field.push('prop');
79+
e.duplicate_class_field(child, key);
8080
}
8181

8282
if (child.type === 'MethodDefinition') {
@@ -89,6 +89,9 @@ export function ClassBody(node, context) {
8989
fields.set(key, [child.kind]);
9090
continue;
9191
}
92+
if (field.includes(child.kind) || field.includes('prop')) {
93+
e.duplicate_class_field(child, key);
94+
}
9295
if (child.kind === 'get') {
9396
if (field.length === 1 && field[0] === 'set') {
9497
field.push('get');

0 commit comments

Comments
 (0)