Add tests for #15358 (#17664)

This commit is contained in:
Wesley Wigham authored and GitHub committed 2017-08-08 13:06:12 -07:00
1 parent 83ae8afef8
commit af20adb137
3 files changed
+26

No files matched your search

@@ -0,0 +1,13 @@
tests/cases/compiler/checkTypePredicateForRedundantProperties.ts(1,35): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/checkTypePredicateForRedundantProperties.ts(1,46): error TS2300: Duplicate identifier 'a'.
==== tests/cases/compiler/checkTypePredicateForRedundantProperties.ts (2 errors) ====
function addProp2(x: any): x is { a: string; a: string; } {
~
!!! error TS2300: Duplicate identifier 'a'.
~
!!! error TS2300: Duplicate identifier 'a'.
return true;
}
@@ -0,0 +1,10 @@
//// [checkTypePredicateForRedundantProperties.ts]
function addProp2(x: any): x is { a: string; a: string; } {
return true;
}
//// [checkTypePredicateForRedundantProperties.js]
function addProp2(x) {
return true;
}
@@ -0,0 +1,3 @@
function addProp2(x: any): x is { a: string; a: string; } {
return true;
}