Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,11 @@ function lowerObjectPropertyKey(
kind: 'identifier',
name: key.node.name,
};
} else if (key.isNumericLiteral()) {
return {
kind: 'identifier',
name: String(key.node.value),
};
}

builder.errors.push({
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

## Input

```javascript
function foo(x) {
const y = {0x10: x};
const {16: z} = y;
return z;
}

export const FIXTURE_ENTRYPOINT = {
fn: foo,
params: [10],
isComponent: false,
};

```

## Code

```javascript
import { c as _c } from "react/compiler-runtime";
function foo(x) {
const $ = _c(2);
let t0;
if ($[0] !== x) {
t0 = { 16: x };
$[0] = x;
$[1] = t0;
} else {
t0 = $[1];
}
const y = t0;
const { 16: z } = y;
return z;
}

export const FIXTURE_ENTRYPOINT = {
fn: foo,
params: [10],
isComponent: false,
};

```

### Eval output
(kind: ok) 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function foo(x) {
const y = {0x10: x};
const {16: z} = y;
return z;
}

export const FIXTURE_ENTRYPOINT = {
fn: foo,
params: [10],
isComponent: false,
};
Loading