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

fix: fix crash extracting struct with type parameter #1521

Merged
merged 1 commit into from
May 17, 2024

Conversation

matt2e
Copy link
Contributor

@matt2e matt2e commented May 17, 2024

FTL panics when compiling code like this:

//ftl:data
type DataWithType[T any] struct {
	Value T
}

VisitStruct was iterating through type parameters and type parameter values, but there are no values in this case.

@matt2e matt2e requested review from alecthomas and a team as code owners May 17, 2024 02:10
@matt2e matt2e requested review from wesbillman and removed request for a team May 17, 2024 02:10
@ftl-robot ftl-robot mentioned this pull request May 17, 2024
@matt2e matt2e force-pushed the matt2e/extract-struct-type-params branch from a204426 to 41efd97 Compare May 17, 2024 02:16
@matt2e matt2e marked this pull request as draft May 17, 2024 03:09
@matt2e
Copy link
Contributor Author

matt2e commented May 17, 2024

Actually, putting this on hold, I think #1522 might have unblocked what I needed.

@matt2e matt2e marked this pull request as ready for review May 17, 2024 03:47
@matt2e
Copy link
Contributor Author

matt2e commented May 17, 2024

It wasn't blocking me in the end, but submitting again because I do think its a legit issue.

@matt2e matt2e force-pushed the matt2e/extract-struct-type-params branch from 41efd97 to a72be25 Compare May 17, 2024 05:47
@matt2e matt2e merged commit dce2ea4 into main May 17, 2024
24 checks passed
@matt2e matt2e deleted the matt2e/extract-struct-type-params branch May 17, 2024 05:55
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.

None yet

1 participant