From d266b68f9dbf60f70f8c20e576ea0663a1cf9d68 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 14 Oct 2014 17:29:46 -0700 Subject: [PATCH] Added test case for semantic classification with union types. --- .../semanticClassificationWithUnionTypes.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/cases/fourslash/semanticClassificationWithUnionTypes.ts diff --git a/tests/cases/fourslash/semanticClassificationWithUnionTypes.ts b/tests/cases/fourslash/semanticClassificationWithUnionTypes.ts new file mode 100644 index 00000000000..40a7f409685 --- /dev/null +++ b/tests/cases/fourslash/semanticClassificationWithUnionTypes.ts @@ -0,0 +1,24 @@ +////module /*0*/M { +//// export interface /*1*/I { +//// } +////} +//// +////interface /*2*/I { +////} +////class /*3*/C { +////} +//// +////var M: /*4*/M./*5*/I | /*6*/I | /*7*/C; +////var I: typeof M | typeof /*8*/C; + +var c = classification; +verify.semanticClassificationsAre( + c.moduleName("M", test.marker("0").position), + c.interfaceName("I", test.marker("1").position), + c.interfaceName("I", test.marker("2").position), + c.className("C", test.marker("3").position), + c.moduleName("M", test.marker("4").position), + c.interfaceName("I", test.marker("5").position), + c.interfaceName("I", test.marker("6").position), + c.className("C", test.marker("7").position), + c.className("C", test.marker("8").position)); \ No newline at end of file