<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/compute/interface-static-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>2018-10-18T16:30:38+00:00</updated>
<entry>
<title>Add support for static methods in interfaces (#680)</title>
<updated>2018-10-18T16:30:38+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2018-10-18T16:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3a5214b65b2a5efdbcf9bf6fb4d7603e9ee63234'/>
<id>urn:sha1:3a5214b65b2a5efdbcf9bf6fb4d7603e9ee63234</id>
<content type='text'>
This change allows an interface to include `static` methods as requirements, so that types that conform to the interface will need to satisfy the requirement with a `static` method.

The essence of the check is simple: when checking that a method satisfies a requirement, we enforce that both are `static` or both are non-`static`.

Making that simple change and adding a test change broke a few other places in the compiler that this change tries to fix. The main fix is to handle cases where we might look up an "effectively static" member of a type through an instance, and to make sure that we replace the instance-based lookup with type-based lookup. There was already logic along these lines in `lower-to-ir.cpp`, so this change centralizes it in `check.cpp` where it seems to logically belong.</content>
</entry>
</feed>
