mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
Merge pull request #6628 from Microsoft/thisTypeAsConstraint
break on 'this' type in hasConstraintReferenceTo
This commit is contained in:
14
tests/baselines/reference/thisTypeAsConstraint.js
Normal file
14
tests/baselines/reference/thisTypeAsConstraint.js
Normal file
@@ -0,0 +1,14 @@
|
||||
//// [thisTypeAsConstraint.ts]
|
||||
class C {
|
||||
public m<T extends this>() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [thisTypeAsConstraint.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.m = function () {
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
9
tests/baselines/reference/thisTypeAsConstraint.symbols
Normal file
9
tests/baselines/reference/thisTypeAsConstraint.symbols
Normal file
@@ -0,0 +1,9 @@
|
||||
=== tests/cases/compiler/thisTypeAsConstraint.ts ===
|
||||
class C {
|
||||
>C : Symbol(C, Decl(thisTypeAsConstraint.ts, 0, 0))
|
||||
|
||||
public m<T extends this>() {
|
||||
>m : Symbol(m, Decl(thisTypeAsConstraint.ts, 0, 9))
|
||||
>T : Symbol(T, Decl(thisTypeAsConstraint.ts, 1, 11))
|
||||
}
|
||||
}
|
||||
9
tests/baselines/reference/thisTypeAsConstraint.types
Normal file
9
tests/baselines/reference/thisTypeAsConstraint.types
Normal file
@@ -0,0 +1,9 @@
|
||||
=== tests/cases/compiler/thisTypeAsConstraint.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
public m<T extends this>() {
|
||||
>m : <T extends this>() => void
|
||||
>T : T
|
||||
}
|
||||
}
|
||||
4
tests/cases/compiler/thisTypeAsConstraint.ts
Normal file
4
tests/cases/compiler/thisTypeAsConstraint.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
class C {
|
||||
public m<T extends this>() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user