Skip to content

Emit an error when attempting add a user-defined conversion function#8206

Open
damyanp wants to merge 5 commits intomicrosoft:mainfrom
damyanp:copilot/fix-issue-5103-tests
Open

Emit an error when attempting add a user-defined conversion function#8206
damyanp wants to merge 5 commits intomicrosoft:mainfrom
damyanp:copilot/fix-issue-5103-tests

Conversation

@damyanp
Copy link
Member

@damyanp damyanp commented Feb 26, 2026

Previously, user-defined conversion functions were silently ignored. This change reports an error if one is defined.

Fixes #5103

Copilot AI and others added 5 commits February 21, 2026 00:26
…soft#5103)

Add err_hlsl_unsupported_conversion_operator diagnostic and check in
CheckConversionDeclarator to reject conversion operators in HLSL.
Previously these were silently ignored, misleading users into thinking
their cast operator overloads were being used.

Co-authored-by: damyanp <8118402+damyanp@users.noreply.github.com>
…oad is not allowed'

Co-authored-by: damyanp <8118402+damyanp@users.noreply.github.com>
Co-authored-by: damyanp <8118402+damyanp@users.noreply.github.com>
Co-authored-by: damyanp <8118402+damyanp@users.noreply.github.com>
@damyanp damyanp marked this pull request as ready for review February 27, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Should emit error on unsupported cast operator overloading that's silently ignored

3 participants