scripts/correctness/test262-known-blockers.json

GitHub
{
  "version": 1,
  "entries": [
    {
      "reason": "sloppy-only-strict-ident",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "variants": "sloppy-only",
        "errorIncludes": ["InvalidIdentInStrict"]
      },
      "note": "SWC parses these identifiers as strict-mode-only rejects even when the Test262 variant is sloppy-only."
    },
    {
      "reason": "swc-parse-async-ident",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "errorIncludes": ["InvalidIdentInAsync"]
      }
    },
    {
      "reason": "swc-parse-await-class-name",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["/class/class-name-ident-await"],
        "errorRegex": ["Expected\\(\"(?:\\{|\\()\", \"await\"\\)"]
      }
    },
    {
      "reason": "swc-parse-static-init-await",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["static-init-await"],
        "errorRegex": ["ExpectedIdent|Expected\\(\"\\(\", \"await\"\\)"]
      }
    },
    {
      "reason": "swc-parse-static-async-constructor-method",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["grammar-static-ctor-async"],
        "errorIncludes": ["AsyncConstructor"]
      }
    },
    {
      "reason": "swc-parse-deep-iife-stack-overflow",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["test/language/statements/function/S13.2.1_A1_T1.js"],
        "errorIncludes": ["has overflowed its stack"]
      },
      "note": "The embedded SWC parser overflows on this deeply nested IIFE chain before Wakaru rules run."
    },
    {
      "reason": "swc-parse-yield-ident",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["yield-as-identifier"],
        "errorIncludes": ["TS1109"]
      }
    },
    {
      "reason": "swc-parse-yield-ident",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["assignmenttargettype/", "identifierreference-yield"],
        "errorIncludes": ["TS1109"]
      }
    },
    {
      "reason": "swc-parse-yield-arrow-parameter",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["arrow-function/syntax/arrowparameters-", "yield"],
        "errorIncludes": ["TS1109"]
      }
    },
    {
      "reason": "swc-parse-yield-label",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathStartsWith": ["test/language/statements/labeled/value-yield-non-strict"],
        "errorIncludes": ["TS1109"]
      }
    },
    {
      "reason": "swc-parse-yield-function-name",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["yield-as-function-expression-binding-identifier"],
        "errorRegex": ["Expected\\(\"\\(\", \"yield\"\\)"]
      }
    },
    {
      "reason": "swc-parse-yield-function-name",
      "status": "unsupported",
      "phase": "wakaru-parse",
      "when": {
        "pathIncludes": ["yield-as-generator-declaration-binding-identifier"],
        "errorIncludes": ["TS1109"]
      }
    },
    {
      "reason": "transform-reject-top-level-await",
      "status": "rejected",
      "phase": "transform",
      "when": {
        "errorIncludes": ["Top-level await is not available"]
      },
      "note": "The selected producer target rejects top-level await before Wakaru runs."
    },
    {
      "reason": "transform-reject-string-export-name",
      "status": "rejected",
      "phase": "transform",
      "when": {
        "errorIncludes": ["Using the string", "as an export name is not supported"]
      },
      "note": "The selected producer target rejects arbitrary string export names before Wakaru runs."
    },
    {
      "reason": "transform-runtime-arrow-this",
      "status": "rejected",
      "phase": "transformed-runtime",
      "when": {
        "pathIncludes": ["test/language/expressions/arrow-function/arrow/binding-tests-"],
        "errorIncludes": ["arrow capturing this"]
      },
      "note": "The producer changed arrow-function this binding before Wakaru runs."
    },
    {
      "reason": "transform-runtime-inferred-name",
      "status": "rejected",
      "phase": "transformed-runtime",
      "when": {
        "errorRegex": ["Expected SameValue\\(.*\\) to be false"]
      },
      "note": "The producer changed function or class inferred-name behavior before Wakaru runs."
    },
    {
      "reason": "transform-runtime-module-default-name",
      "status": "rejected",
      "phase": "transformed-runtime",
      "when": {
        "pathIncludes": ["test/language/module-code/eval-export-dflt"],
        "errorIncludes": ["correct name is assigned"]
      },
      "note": "The module producer changed default export function/class name inference before Wakaru runs."
    },
    {
      "reason": "transform-runtime-module-this",
      "status": "rejected",
      "phase": "transformed-runtime",
      "when": {
        "pathIncludes": ["test/language/module-code/eval-this.js"],
        "errorIncludes": ["Expected SameValue"]
      },
      "note": "The module producer changed top-level this behavior before Wakaru runs."
    },
    {
      "reason": "transform-runtime-with-environment",
      "status": "rejected",
      "phase": "transformed-runtime",
      "when": {
        "pathStartsWith": ["test/language/statements/with/S12.10_"]
      },
      "note": "The producer changed legacy with-environment behavior before Wakaru runs."
    },
    {
      "reason": "script-global-var-lexical-redeclaration",
      "status": "rejected",
      "phase": "decompiled-runtime",
      "when": {
        "pathStartsWith": ["test/language/reserved-words/unreserved-words.js"],
        "errorIncludes": ["Identifier 'assert' has already been declared"],
        "decompiledRegex": ["\\bconst\\s+assert\\s*="]
      },
      "note": "Test262 script execution preloads a global harness binding named assert. Top-level script `var assert` can coexist with that environment, but decompiled top-level `const assert` is a lexical redeclaration."
    },
    {
      "reason": "swc-array-binding-elision",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathStartsWith": ["test/language/statements/for-of/dstr/"],
        "pathRegex": ["array-(?:elem-trlg-iter-)?elision|array-iteration"],
        "errorRegex": ["Test262Error|TypeError"],
        "decompiledRegex": ["\\bfor\\s*\\(\\s*\\[(?:\\]|[^,\\]]+\\]\\s+of)"]
      },
      "note": "SWC currently prints array binding elisions in a way that does not preserve this Test262 runtime behavior."
    },
    {
      "reason": "swc-array-binding-elision",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathStartsWith": ["test/language/statements/for-await-of/"],
        "pathRegex": ["array-(?:elem-trlg-iter-)?elision|array-iteration"],
        "errorRegex": ["Test262Error|TypeError"],
        "decompiledRegex": ["\\bfor\\s+await\\s*\\(\\s*\\[(?:\\]|[^,\\]]+\\]\\s+of)"]
      },
      "note": "SWC currently prints array binding elisions in a way that does not preserve this Test262 runtime behavior."
    },
    {
      "reason": "swc-array-binding-elision",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathStartsWith": ["test/language/expressions/assignment/dstr/"],
        "pathRegex": ["array-(?:elem-trlg-iter-)?elision|array-iteration"],
        "errorRegex": ["Test262Error|TypeError"],
        "decompiledRegex": ["\\[(?:\\]|[^,\\]]+\\]\\s*=)"]
      },
      "note": "SWC currently prints array binding elisions in a way that does not preserve this Test262 runtime behavior."
    },
    {
      "reason": "swc-array-binding-elision",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathStartsWith": ["test/language/expressions/arrow-function/dstr/"],
        "pathRegex": ["(?:^|/)dstr/(?:dflt-)?ary-ptrn-(?:elem-ary-)?elision"],
        "errorRegex": ["Test262Error|TypeError"],
        "decompiledRegex": ["=>"]
      },
      "note": "SWC currently prints array binding elisions in a way that does not preserve this Test262 runtime behavior."
    },
    {
      "reason": "swc-print-class-extends-arrow-parens",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathIncludes": ["/class/heritage-", "arrow-function"],
        "errorIncludes": ["Unexpected token '=>'"],
        "decompiledRegex": ["\\bclass\\s+extends\\s+(?:async\\s*)?\\([^)]*\\)\\s*=>"]
      }
    },
    {
      "reason": "swc-print-new-arrow-parens",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathIncludes": ["test/language/expressions/arrow-function/throw-new.js"],
        "errorIncludes": ["Malformed arrow function parameter list"],
        "decompiledRegex": ["\\bnew\\s*\\(\\s*\\)\\s*=>"]
      }
    },
    {
      "reason": "swc-print-static-constructor-method",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathIncludes": ["grammar-static-ctor-meth-valid.js"],
        "errorIncludes": ["A class may only have one constructor"],
        "decompiledRegex": ["\\bconstructor\\s*\\(\\)\\s*\\{\\}\\s*constructor\\s*\\(\\)"]
      }
    },
    {
      "reason": "swc-print-export-default-function-expression",
      "status": "rejected",
      "phase": "swc-fidelity",
      "when": {
        "pathIncludes": ["test/language/module-code/instn-named-bndng-dflt-expr.js"],
        "errorIncludes": ["binding is created but not initialized"],
        "decompiledRegex": ["\\bexport\\s+default\\s+function\\s*\\("]
      },
      "note": "SWC prints `export default (function() {})` as a default function declaration, which changes self-import TDZ behavior."
    }
  ]
}