Skip to content

Conversation

HerrCai0907
Copy link
Member

Fix #2269

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey
Copy link
Member

MaxGraey commented Jul 27, 2022

What about this approach?

let isPlain = this.isPlainObject(clazz);
typeName = `${isPlain ? "__Record" : "__Internref"}${clazz.id}`;
sb.push(typeName);
seenObjectTypes.set(clazz, typeName);
if (isPlain) {
  sb.push(mode == Mode.EXPORT ? "<never>" : "<undefined>");
  this.deferredTypings.push(this.makeRecordType(clazz, mode));
} else {
  this.deferredTypings.push(this.makeInternrefType(clazz));
}

@MaxGraey MaxGraey requested a review from dcodeIO August 7, 2022 04:11
@MaxGraey MaxGraey merged commit 1983883 into AssemblyScript:main Aug 7, 2022
@MaxGraey
Copy link
Member

MaxGraey commented Aug 7, 2022

Thanks!

@HerrCai0907 HerrCai0907 deleted the fix/recursive-class branch August 7, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recursive Class | RangeError: Maximum call stack size exceeded
2 participants