<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/bugs/mutating/mutating-generic-method.slang.expected.txt, 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>2020-12-02T22:12:51+00:00</updated>
<entry>
<title>Fix [mutating] generic methods (#1618)</title>
<updated>2020-12-02T22:12:51+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-12-02T22:12:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ad5dda9261bae63e32bcb914b109fcb5c92faf25'/>
<id>urn:sha1:ad5dda9261bae63e32bcb914b109fcb5c92faf25</id>
<content type='text'>
Slang generates code that turns the implicit `this` parameter of a method into an explicit parameter. The logic that decides whether that parameter should be `inout` is a bit involved, and there was a bug where a generic method would lead to the use of an `in` modifier (the default) and override the `inout` modifier that was requested by the method itself.

This change fixes the logic to treat generic declarations in the parent chain of a leaf method as having no bearing on whether an implicit `this` parameter should be `inout` or not.

A test case is included that breaks with the old behavior, and demonstrates that a generic `[mutating]` method can now work correctly.</content>
</entry>
</feed>
