Skip to content

Commit f3afb13

Browse files
committed
Rebase to main
1 parent 9483aec commit f3afb13

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-template-literal.expect.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
```javascript
55
import {Stringify, identity} from 'shared-runtime';
66

7-
function t(quasis, ...subExprs) {
8-
return [quasis, subExprs];
9-
}
10-
117
function foo() {
128
try {
139
identity(`${Symbol('0')}`); // Uncaught TypeError: Cannot convert a Symbol value to a string (leave as is)
@@ -50,7 +46,6 @@ function foo() {
5046
`${`${`${`${0}`}`}`}`,
5147
`${`${`${`${''}`}`}`}`,
5248
`${`${`${`${identity('')}`}`}`}`,
53-
// TODO: t`1${2}3`,
5449
]}
5550
/>
5651
);
@@ -70,21 +65,6 @@ export const FIXTURE_ENTRYPOINT = {
7065
import { c as _c } from "react/compiler-runtime";
7166
import { Stringify, identity } from "shared-runtime";
7267

73-
function t(quasis, ...t0) {
74-
const $ = _c(3);
75-
const subExprs = t0;
76-
let t1;
77-
if ($[0] !== quasis || $[1] !== subExprs) {
78-
t1 = [quasis, subExprs];
79-
$[0] = quasis;
80-
$[1] = subExprs;
81-
$[2] = t1;
82-
} else {
83-
t1 = $[2];
84-
}
85-
return t1;
86-
}
87-
8868
function foo() {
8969
const $ = _c(1);
9070
try {
@@ -114,7 +94,7 @@ function foo() {
11494
`${Number.MIN_SAFE_INTEGER}`,
11595
`${Number.MAX_VALUE}`,
11696
`${Number.MIN_VALUE}`,
117-
`${-0}`,
97+
"0",
11898
`${{}}`,
11999
`${[1, 2, 3]}`,
120100
"true",

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-template-literal.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import {Stringify, identity} from 'shared-runtime';
22

3-
function t(quasis, ...subExprs) {
4-
return [quasis, subExprs];
5-
}
6-
73
function foo() {
84
try {
95
identity(`${Symbol('0')}`); // Uncaught TypeError: Cannot convert a Symbol value to a string (leave as is)
@@ -46,7 +42,6 @@ function foo() {
4642
`${`${`${`${0}`}`}`}`,
4743
`${`${`${`${''}`}`}`}`,
4844
`${`${`${`${identity('')}`}`}`}`,
49-
// TODO: t`1${2}3`,
5045
]}
5146
/>
5247
);

0 commit comments

Comments
 (0)