<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/bugs/ptr-extension-this-type.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-11T22:24:41+00:00</updated>
<entry>
<title>Fix segfault with Ptr&lt;T&gt; extension using 'This' type reference (#7719)</title>
<updated>2025-07-11T22:24:41+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-07-11T22:24:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=243f522a9087a807d2dadbb3ef201694b6897bf7'/>
<id>urn:sha1:243f522a9087a807d2dadbb3ef201694b6897bf7</id>
<content type='text'>
* Fix segfault with Ptr&lt;T&gt; extension using 'This' type reference

Set LookupOptions::NoDeref when looking up target type members within
extension declarations to prevent automatic pointer dereferencing that
was causing breadcrumb handling issues and segfaults.

Fixes #7656

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

* Enhance test for ptr-extension-this-type to verify correctness with interpreter

- Changed function to return sizeof(This) - sizeof(Ptr&lt;int&gt;) + 1
- Modified test to use interpreter with filecheck to verify result equals 1
- Added main() function that calls the extension method and prints result
- Verifies that 'This' correctly refers to Ptr&lt;int&gt; in extension context

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

---------

Co-authored-by: github-actions[bot] &lt;41898282+github-actions[bot]@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;csyonghe@users.noreply.github.com&gt;</content>
</entry>
</feed>
