-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScript
Description
π Search Terms
move to file debug failure changes overlap imports move to importing file
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
N/A
π» Code
/// <reference path='fourslash.ts' />
// @filename: /ctx.ts
//// export class ProcessorContext {}
// @filename: /possibleBreakpoints.ts
//// import { ProcessorContext } from "./ctx";
////
//// export class AllBreakpointsForSource {}
////
//// export function [|createSourceBreakpointsCache|]() {
//// return {
//// get: (cx: ProcessorContext, sourceId: string) => new AllBreakpointsForSource();
//// };
//// }
// @filename: /recordingProcessor.ts
//// import { createSourceBreakpointsCache } from "./possibleBreakpoints";
////
//// export class RecordingProcessor {
//// public allSourceBreakpointsCache = createSourceBreakpointsCache();
//// }
verify.moveToFile({
newFileContents: {
"/possibleBreakpoints.ts": `TODO: fill this in`,
"/recordingProcessor.ts": `TODO: fill this in`,
},
interactiveRefactorArguments: { targetFile: "/recordingProcessor.ts" },
});
π Actual behavior
This crashes with:
Error: Debug Failure. False expression: Changes overlap
Verbose Debug Information: {"pos":0,"end":70} and {"pos":9,"end":9}
π Expected behavior
It should move the code correctly
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript