File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
packages/pyright-internal/src/analyzer Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1608,18 +1608,12 @@ export namespace FunctionType {
16081608 boundToType ?: ClassType ,
16091609 boundTypeVarScopeId ?: TypeVarScopeId
16101610 ) : FunctionType {
1611- const newFunction = create (
1612- type . details . name ,
1613- type . details . fullName ,
1614- type . details . moduleName ,
1615- type . details . flags ,
1616- type . flags ,
1617- type . details . docString
1618- ) ;
1611+ const newFunction = TypeBase . cloneType ( type ) ;
16191612
16201613 newFunction . details = { ...type . details } ;
1621- newFunction . boundToType = boundToType ?? type . boundToType ;
16221614 newFunction . preBoundFlags = newFunction . details . flags ;
1615+ newFunction . boundToType = boundToType ;
1616+ newFunction . boundTypeVarScopeId = boundTypeVarScopeId ;
16231617
16241618 if ( stripFirstParam ) {
16251619 if ( type . details . parameters . length > 0 ) {
@@ -1658,7 +1652,6 @@ export namespace FunctionType {
16581652 }
16591653
16601654 newFunction . inferredReturnType = type . inferredReturnType ;
1661- newFunction . boundTypeVarScopeId = boundTypeVarScopeId ?? type . boundTypeVarScopeId ;
16621655
16631656 return newFunction ;
16641657 }
You can’t perform that action at this time.
0 commit comments