Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preventExtensions on comptime functions #1494

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

bbrk24
Copy link
Contributor

@bbrk24 bbrk24 commented Oct 22, 2024

Fixes #1493

Copy link
Collaborator

@edemaine edemaine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying to have to repeat this code, but looks good!

@@ -161,6 +161,8 @@ function serialize(value: ???, context?: NodeJS.Dict<any>): string
// builtin, or returned from Function::bind
throw new TypeError "cannot serialize native function"
if /^class[\s{]/u.test string
if not Object.isExtensible val
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not Object.isExtensible val
unless Object.isExtensible val

(also on line 203 and 265)

@STRd6 STRd6 merged commit fef9825 into DanielXMoore:main Oct 23, 2024
4 checks passed
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.

comptime serializer doesn't freeze functions
3 participants