8000 `swc/crates/swc/tests/fixture/issues-1xxx/pr-1524` should throw error · Issue #10618 · swc-project/swc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
swc/crates/swc/tests/fixture/issues-1xxx/pr-1524 should throw error #10618
Closed
@bvanjoi

Description

@bvanjoi

Describe the bug

The directory contains two test cases with different configurations:

function Bar() {
    const [foo, setFoo] = useState(0);
    // @refresh reset
    React.useEffect(() => {
    });
    return <h1>{ foo } < /h1>;
}

The implementation should throw a parsing error instead of generating an output file when encountering < /.

Input code

Config

Link to the code that reproduces this issue

https://play.swc.rs/?version=1.12.1&code=H4sIAAAAAAAAAy1NuwrDMBDb8xUaHSh1O%2BdBKbQfkIylgzF3pIsP7PMU%2FO89QjQIJPTgmqL%2BJOEZsuuxdzBESUXxYZELCulb5IsJtdCqQcnd%2BuGIeY9HJs5UNhiRHu5CIerVwi9miupsdZrP4XY2M2nNCeN2n3fYDRpGeFND1%2F4p7qYCkgAAAA%3D%3D&config=H4sIAAAAAAAAA1WPTQ7CIBCF9z0FmbULNdGFd%2FAQBKcNhgJhpomk6d0L5UfdMd97b96wDkLAmxQ8xJqeafAyEIY%2BJ0LRsvwkAhw9kgraM5yaypQlDgseZCsCsAwTcg4hXc%2BXWw2AcY4w4VEawspmbfUYfyuVm31Aon9jtko7mZ4vjUNthdm9lkOsX8nnlgvu8DW1sr4YND1bsqzddoFla%2FwXAQAA

SWC Info output

No response

Expected behavior

throw parse error

Actual behavior

parse scueess

Version

1.12.1

Additional context

reference: https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAIQIYCcAUBKRBvAKEWMQgQGcpEBtYOOAGkXIFMoAxegXUQF5EQrAMpRUUFpgAM2ANxESAegWIAAuhbB15ABaItbecQBKLVNAB0glgFFgwFtEw4+APnyHEAX1kf1UEOhIADzaAIwueIh0cF6IQYgKYS5ynkA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0