Skip to content

Commit 95af997

Browse files
committedFeb 7, 2015
Accept correct baselines for symbol property tests
1 parent 779661c commit 95af997

File tree

78 files changed

+1830
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1830
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tests/cases/conformance/es6/Symbols/symbolProperty10.ts(10,5): error TS2322: Type 'I' is not assignable to type 'C'.
2+
Types of property '[Symbol.iterator]' are incompatible.
3+
Type '{ x: any; }' is not assignable to type '{ x: any; y: any; }'.
4+
Property 'y' is missing in type '{ x: any; }'.
5+
6+
7+
==== tests/cases/conformance/es6/Symbols/symbolProperty10.ts (1 errors) ====
8+
class C {
9+
[Symbol.iterator]: { x; y };
10+
}
11+
interface I {
12+
[Symbol.iterator]?: { x };
13+
}
14+
15+
var i: I;
16+
i = new C;
17+
var c: C = i;
18+
~
19+
!!! error TS2322: Type 'I' is not assignable to type 'C'.
20+
!!! error TS2322: Types of property '[Symbol.iterator]' are incompatible.
21+
!!! error TS2322: Type '{ x: any; }' is not assignable to type '{ x: any; y: any; }'.
22+
!!! error TS2322: Property 'y' is missing in type '{ x: any; }'.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//// [symbolProperty10.ts]
2+
class C {
3+
[Symbol.iterator]: { x; y };
4+
}
5+
interface I {
6+
[Symbol.iterator]?: { x };
7+
}
8+
9+
var i: I;
10+
i = new C;
11+
var c: C = i;
12+
13+
//// [symbolProperty10.js]
14+
var C = (function () {
15+
function C() {
16+
}
17+
return C;
18+
})();
19+
var i;
20+
i = new C;
21+
var c = i;

0 commit comments

Comments
 (0)