Skip to content

Mark ERR_FunctionPointerTypesInAttributeNotSupported as build-only#81453

Merged
jjonescz merged 1 commit intodotnet:mainfrom
jjonescz:fnptr-build-only
Dec 2, 2025
Merged

Mark ERR_FunctionPointerTypesInAttributeNotSupported as build-only#81453
jjonescz merged 1 commit intodotnet:mainfrom
jjonescz:fnptr-build-only

Conversation

@jjonescz
Copy link
Member

No description provided.

@CyrusNajmabadi
Copy link
Contributor

Dumb quesstion. Why is this not a normal binding time error? why does it happen during build only?

@jjonescz
Copy link
Member Author

Currently this error is reported inside TypeNameSerializer whenever it visits a function pointer. That seems more reliable than trying to figure out all the places in binding which could lead to us trying to serialize a fnptr later during emit. But it could definitely be improved by catching at least some places during binding and leaving the emit error as a fallback.

@CyrusNajmabadi
Copy link
Contributor

That seems more reliable than trying to figure out all the places in binding which could lead to us trying to serialize a fnptr later during emit.

Thanks :) If it is too complex to check during binding, that makes sense to me.

@jcouv jcouv self-assigned this Dec 1, 2025
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (commit 1)

@jjonescz jjonescz merged commit b5046ba into dotnet:main Dec 2, 2025
30 checks passed
@jjonescz jjonescz deleted the fnptr-build-only branch December 2, 2025 10:18
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 2, 2025
@davidwengier davidwengier modified the milestones: Next, 18.3 Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants