diff --git a/tests/cases/compiler/errorsWithCallablesInUnions01.ts b/tests/cases/compiler/errorsWithCallablesInUnions01.ts deleted file mode 100644 index 2cb6a3ebd3..0000000000 --- a/tests/cases/compiler/errorsWithCallablesInUnions01.ts +++ /dev/null @@ -1,10 +0,0 @@ -interface IDirectiveLinkFn { - (scope: TScope): void; -} - -interface IDirectivePrePost { - pre?: IDirectiveLinkFn; - post?: IDirectiveLinkFn; -} - -export let blah: IDirectiveLinkFn | IDirectivePrePost = (x: string) => {} diff --git a/tests/cases/compiler/errorsWithInvokablesInUnions01.ts b/tests/cases/compiler/errorsWithInvokablesInUnions01.ts new file mode 100644 index 0000000000..56491af71c --- /dev/null +++ b/tests/cases/compiler/errorsWithInvokablesInUnions01.ts @@ -0,0 +1,18 @@ +interface ConstructableA { + new(): { somePropA: any }; +} + +interface IDirectiveLinkFn { + (scope: TScope): void; +} + +interface IDirectivePrePost { + pre?: IDirectiveLinkFn; + post?: IDirectiveLinkFn; +} + +export let blah: IDirectiveLinkFn | ConstructableA | IDirectivePrePost = (x: string) => {} + +export let ctor: IDirectiveLinkFn | ConstructableA | IDirectivePrePost = class { + someUnaccountedProp: any; +}