Skip to content

test: add SelfReferentialStruct test case#1072

Closed
puckey wants to merge 1 commit into
mrousavy:mainfrom
puckey:test/self-referential-struct
Closed

test: add SelfReferentialStruct test case#1072
puckey wants to merge 1 commit into
mrousavy:mainfrom
puckey:test/self-referential-struct

Conversation

@puckey

@puckey puckey commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

Adds a struct with a callback that references the same struct type.

Currently fails with "Maximum call stack size exceeded" due to infinite recursion in nitrogen's type walker.

Adds a struct with a callback that references the same struct type.

Currently fails with "Maximum call stack size exceeded" due to
infinite recursion in nitrogen's type walker.
@vercel

vercel Bot commented Dec 1, 2025

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

@mrousavy

mrousavy commented Dec 2, 2025

Copy link
Copy Markdown
Owner

@puckey

puckey commented Dec 2, 2025

Copy link
Copy Markdown
Contributor Author

For this case I expected it to be possible, or is it something you don't want to support:

export interface SelfReferentialStruct {
  transform?: (config: SelfReferentialStruct) => Promise<SelfReferentialStruct>
}

@puckey

puckey commented Dec 2, 2025

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1074 which includes this test case along with a fix

@puckey puckey closed this Dec 2, 2025
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.

2 participants