Update test

This commit is contained in:
Anders Hejlsberg 2018-04-10 17:35:27 -10:00
parent b40592c34e
commit 0a37cd3736

View File

@ -190,13 +190,13 @@ function f51<T, K extends keyof T>(k: K, s: string) {
const x2 = k as string;
}
function f52<T>(obj: { [x: string]: boolean }, k: keyof T, s: string, n: number) {
function f52<T>(obj: { [x: string]: boolean }, k: Exclude<keyof T, symbol>, s: string, n: number) {
const x1 = obj[s];
const x2 = obj[n];
const x3 = obj[k];
}
function f53<T, K extends keyof T>(obj: { [x: string]: boolean }, k: K, s: string, n: number) {
function f53<T, K extends Exclude<keyof T, symbol>>(obj: { [x: string]: boolean }, k: K, s: string, n: number) {
const x1 = obj[s];
const x2 = obj[n];
const x3 = obj[k];