Skip to content

Recursive type will panic the code generator #1124

@stevesg

Description

@stevesg

Defining a custom route with a recursive type will cause the code generator to panic, an error would perhaps be preferable.

In my case I accidentally defined a list containing itself:

#Matcher: {
	type:  "=" | "!=" | "=~" | "!~" @cuetsy(kind="enum",memberNames="Equal|NotEqual|EqualRegex|NotEqualRegex")
	label: string
	value: string
}

#Matchers: [...#Matchers]

👇

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02c2b0520 stack=[0xc02c2b0000, 0xc04c2b0000]
fatal error: stack overflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions