pull/15820/head
Rich Harris 4 months ago
parent 3bfcaccc85
commit ae7e5bbe3f

@ -57,7 +57,11 @@ export function validate_assignment(node, argument, context) {
) {
const grandparent = get_parent(context.path, i - 1);
if (grandparent.type === 'MethodDefinition' && grandparent.kind === 'constructor') {
if (
grandparent.type === 'MethodDefinition' &&
grandparent.kind === 'constructor' &&
/** @type {number} */ (node.start) < /** @type {number} */ (field.node.start)
) {
e.state_field_invalid_assignment(node);
}

Loading…
Cancel
Save