Skip to content

Commit bca614d

Browse files
committed
renaming a method to be more accurate
1 parent 5b7b29c commit bca614d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: src/compiler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8172,7 +8172,7 @@ export class Compiler extends DiagnosticEmitter {
81728172
prototype.name,
81738173
prototype,
81748174
null,
8175-
prototype.isAnonymous ? signature.toClosureSignature() : signature,
8175+
prototype.hasNestedDefinition ? signature.toClosureSignature() : signature,
81768176
contextualTypeArguments
81778177
);
81788178
if (!this.compileFunction(instance)) return this.module.unreachable();
@@ -8185,7 +8185,7 @@ export class Compiler extends DiagnosticEmitter {
81858185

81868186
// if this anonymous function turns out to be a non-closure, recompile a version
81878187
// of the function without context, deleting the previous function
8188-
if (instance.closedLocals.size == 0 && instance.prototype.isAnonymous) {
8188+
if (instance.closedLocals.size == 0 && instance.prototype.hasNestedDefinition) {
81898189
this.module.removeFunction(instance.internalName);
81908190
instance = new Function(
81918191
instance.prototype.name + "~nonClosure",

Diff for: src/program.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3230,7 +3230,7 @@ export class FunctionPrototype extends DeclaredElement {
32303230
);
32313231
}
32323232

3233-
get isAnonymous(): bool {
3233+
get hasNestedDefinition(): bool {
32343234
var parent = this.parent;
32353235
return parent.kind == ElementKind.FUNCTION;
32363236
}

Diff for: src/resolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2774,7 +2774,7 @@ export class Resolver extends DiagnosticEmitter {
27742774
var signature = new Signature(this.program, parameterTypes, returnType, thisType);
27752775
signature.parameterNames = parameterNames;
27762776
signature.requiredParameters = requiredParameters;
2777-
if (prototype.isAnonymous) signature = signature.toClosureSignature();
2777+
if (prototype.hasNestedDefinition) signature = signature.toClosureSignature();
27782778

27792779
var nameInclTypeParameters = prototype.name;
27802780
if (instanceKey.length) nameInclTypeParameters += "<" + instanceKey + ">";

0 commit comments

Comments
 (0)