mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Fix fourslash tests
This commit is contained in:
@@ -7,5 +7,5 @@
|
||||
////// x should not be contextually typed so this should be an error
|
||||
////f6(/**/x => x<number>())
|
||||
|
||||
verify.quickInfoAt("", "(parameter) x: any");
|
||||
verify.quickInfoAt("", "(parameter) x: T extends T");
|
||||
verify.numberOfErrorsInCurrentFile(1);
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////interface Comparable<T> {
|
||||
//// compareTo(other: T): T;
|
||||
////}
|
||||
////interface Comparer {
|
||||
//// <T extends Comparable<T>>(x: T, y: T): T;
|
||||
////}
|
||||
interface Comparable<T> {
|
||||
compareTo(other: T): T;
|
||||
}
|
||||
interface Comparer {
|
||||
<T extends Comparable<T>>(x: T, y: T): T;
|
||||
}
|
||||
|
||||
////var max2: Comparer = (x/*1*/x, y/*2*/y) => { return x/*3*/x.compareTo(y/*4*/y) };
|
||||
//var max2: Comparer = (x/*1*/x, y/*2*/y) => { return x/*3*/x.compareTo(y/*4*/y) };
|
||||
|
||||
verify.quickInfos({
|
||||
1: "(parameter) xx: any",
|
||||
2: "(parameter) yy: any",
|
||||
3: "(parameter) xx: any",
|
||||
4: "(parameter) yy: any"
|
||||
1: "(parameter) xx: T extends Comparable<T>",
|
||||
2: "(parameter) yy: T extends Comparable<T>",
|
||||
3: "(parameter) xx: T extends Comparable<T>",
|
||||
4: "(parameter) yy: T extends Comparable<T>"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user