File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16321,9 +16321,6 @@ func (c *Checker) getConstraintOfType(t *Type) *Type {
16321
16321
}
16322
16322
16323
16323
func (c *Checker) getConstraintOfTypeParameter(typeParameter *Type) *Type {
16324
- if typeParameter.flags&TypeFlagsTypeParameter == 0 {
16325
- return nil
16326
- }
16327
16324
if c.hasNonCircularBaseConstraint(typeParameter) {
16328
16325
return c.getConstraintFromTypeParameter(typeParameter)
16329
16326
}
@@ -16336,6 +16333,10 @@ func (c *Checker) hasNonCircularBaseConstraint(t *Type) bool {
16336
16333
16337
16334
// This is a worker function. Use getConstraintOfTypeParameter which guards against circular constraints
16338
16335
func (c *Checker) getConstraintFromTypeParameter(t *Type) *Type {
16336
+ if t.Flags()&TypeFlagsTypeParameter == 0 {
16337
+ return nil
16338
+ }
16339
+
16339
16340
tp := t.AsTypeParameter()
16340
16341
if tp.constraint == nil {
16341
16342
var constraint *Type
You can’t perform that action at this time.
0 commit comments