Skip to content

getIndentation fails with JsxElement #4332

Description

@saschanaz
/// <reference path='fourslash.ts' />

//@Filename: file.tsx
////(function () {
////    return (
////        <div>
////            <div>
////            </div>
////            /*indent2*/
////        </div>
////    )
////})


format.document();
goTo.marker("indent2");
verify.indentationIs(12);

This causes error (in master branch):

Error: Debug Failure. False expression:
 at Object.assert (eval at <anonymous> (C:\Users\sasch_000\Documents\GitHub\typescript-f\built\local\run.js:53472:13), <anonymous>:1549:23)

Inserting a text line prevents this error. (foo)

//@Filename: file.tsx
////(function () {
////    return (
////        <div>
////            <div>
////            </div>
////            foo
////            /*indent2*/
////        </div>
////    )
////})

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions