<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/diagnostics/interfaces/mutating-impl-of-non-mutating-req.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>2024-12-31T07:39:07+00:00</updated>
<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>
<entry>
<title>Fix bugs related to mutating implementations of interface methods (#1461)</title>
<updated>2020-07-25T01:12:41+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-07-25T01:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=87940a649e3b4f757905015de95225d57ec2f27c'/>
<id>urn:sha1:87940a649e3b4f757905015de95225d57ec2f27c</id>
<content type='text'>
There are two main bug fixes here:

* We were failing to diagnose when code calls a `[mutating]` method on a value that doesn't support mutation (that is an r-value instead of an l-value).

* We had a bug in the synthesis logic for interface requirements where we used the *result* type of the requirement in place of each of the *parameter* types.

The second bug made synthesis often produce incorrect signatures with `void` parameters.

The first bug meant that even though a `[mutating]` method should not be able to satisfy a non-`[mutating]` method (and we had code to enforce this for the "exact match" case), when we go on to try and synthesize a non-`[mutating]` method that satisfies the requirement by delegating to the user-written one, it would end up succeeding, because nothing was stopping a non-`[mutating]` method from calling a `[mutating]` one.

In each case this code adds a fix and a test case to confirm it.</content>
</entry>
</feed>
