Skip to content

Commit a5c2577

Browse files
blicklycopybara-github
authored andcommitted
Make the specialized types created for bind/goog.partial anonymous
These types are unique from the original definitions, so they should rightly be a new anonymous type rather than conflated with the original type. PiperOrigin-RevId: 326034992
1 parent 4948397 commit a5c2577

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/google/javascript/jscomp/TypeInference.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,7 @@ private void updateBind(Node n) {
19741974
FunctionType.builder(registry)
19751975
.copyFromOtherFunction(callTargetFn)
19761976
.withTypeOfThis(thisType.toObjectType())
1977+
.withSourceNode(null)
19771978
.buildAndResolve();
19781979
target.setJSType(callTargetFn);
19791980
}
@@ -1990,6 +1991,7 @@ private void updateBind(Node n) {
19901991
FunctionType.builder(registry)
19911992
.copyFromOtherFunction(bindType)
19921993
.withReturnType(returnType)
1994+
.withSourceNode(null)
19931995
.buildAndResolve();
19941996
n.getFirstChild().setJSType(bindType);
19951997
}
@@ -2715,4 +2717,3 @@ private static TypedVar getDeclaredVar(FlowScope scope, String name) {
27152717
return ((TypedScope) scope.getDeclarationScope()).getVar(name);
27162718
}
27172719
}
2718-

0 commit comments

Comments
 (0)