Files
tsgo/testdata/tests/cases/compiler/emitOutputPathWithCaseFoldingRootDir.ts
65535b2038 Prevent crash when computing emit output paths (#4900)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: DanielRosenwasser <[email protected]>
Co-authored-by: weswigham <[email protected]>
2026-08-19 20:46:00 +00:00

14 lines
623 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Each Kelvin sign 'K' below case-folds to the single-byte 'k', so with
// useCaseSensitiveFileNames off, the raw (non-canonicalized) rootDir is longer,
// in bytes, than the source file's own directory portion, even though the source
// file's full path (with its suffix) is longer overall. Computing the output path
// used to slice the source path using the *raw* rootDir's byte length, which
// panicked here since that byte length exceeded the directory portion's.
// @currentDirectory: /a
// @useCaseSensitiveFileNames: false
// @rootDir: /a/KKKK
// @outDir: /a/out
// @filename: /a/kkkk/a.ts
export const x = 1;