<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/interfaces/argument-direction-mismatch.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-07-24T07:47:26+00:00</updated>
<entry>
<title>Fix confusing error messages for interface return type mismatches (#7854)</title>
<updated>2025-07-24T07:47:26+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-24T07:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2d23a962766a97cbb11bcee5483a66aec923da49'/>
<id>urn:sha1:2d23a962766a97cbb11bcee5483a66aec923da49</id>
<content type='text'>
* Initial plan

* Add improved diagnostic for interface return type mismatches

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Complete fix for interface return type mismatch error reporting

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Move diagnostic to synthesis phase for better interface return type mismatch errors

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Remove extraneous test file and update .gitignore

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Add diagnostic test for interface return type mismatch and apply formatting

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Address feedback: restore whitespace and use filecheck for diagnostic test

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix logic error in return type mismatch detection

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Remove unnecessary flag by using out parameter for diagnostic tracking

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Refactor witness synthesis failure reporting to use structured approach

Replace ad-hoc `outSpecificDiagnosticEmitted` parameter with `WitnessSynthesisFailureReason` enum and `MethodWitnessSynthesisFailureDetails` struct as requested in code review. This provides:

- Clear taxonomy of failure reasons (General, MethodResultTypeMismatch, MethodParameterMismatch)
- Centralized diagnostic emission in findWitnessForInterfaceRequirement
- Better extensibility for future failure types
- Improved maintainability by removing state tracking flags

The return type mismatch diagnostic continues to work correctly, showing error 38106 with precise location information.

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Remove unused MethodParameterMismatch enum and duplicate code

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Remove redundant requiredMethod field from MethodWitnessSynthesisFailureDetails

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Address feedback: add outFailureDetails guard and remove unnecessary hasReturnTypeError variable

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix regression: restore original diagnostic message for mutating method mismatch

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix.

* Fix.

* Remove `innerSink`.

* Print candidates considered  for interface match upon error.

* Fix tests.

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Check mismatching method parameter direction against interface declaration. (#5964)</title>
<updated>2024-12-31T07:39:07+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-12-31T07:39:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=cc1b96d91d8875bf727079d58fbf78af1135f505'/>
<id>urn:sha1:cc1b96d91d8875bf727079d58fbf78af1135f505</id>
<content type='text'>
</content>
</entry>
</feed>
