=== tests/cases/conformance/types/localTypes/localTypes5.ts ===
function foo<A>() {
>foo : <A>() => X.m<number, boolean>.<Date>.Y<string>
>A : A

    class X {
>X : X

        m<B, C>() {
>m : <B, C>() => <Date>.Y<string>
>B : B
>C : C

            return (function <D>() {
>(function <D>() {                class Y<E> {                }                return new Y<string>();            })<Date>() : <Date>.Y<string>
>(function <D>() {                class Y<E> {                }                return new Y<string>();            }) : <D>() => Y<string>
>function <D>() {                class Y<E> {                }                return new Y<string>();            } : <D>() => Y<string>
>D : D

                class Y<E> {
>Y : Y<E>
>E : E
                }
                return new Y<string>();
>new Y<string>() : Y<string>
>Y : typeof Y

            })<Date>();
>Date : Date
        }
    }
    var x = new X();
>x : X
>new X() : X
>X : typeof X

    return x.m<number, boolean>();
>x.m<number, boolean>() : X.m<number, boolean>.<Date>.Y<string>
>x.m : <B, C>() => X.m<B, C>.<Date>.Y<string>
>x : X
>m : <B, C>() => X.m<B, C>.<Date>.Y<string>
}
var x = foo<void>();
>x : foo<void>.X.m<number, boolean>.<Date>.Y<string>
>foo<void>() : foo<void>.X.m<number, boolean>.<Date>.Y<string>
>foo : <A>() => X.m<number, boolean>.<Date>.Y<string>

