yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeAdd diagnostic on invalid type constraint. (#3769)78d4df064

master
347 B27 linesraw
1//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK):
2
3interface IFoo
4{
5    This foo();
6}
7
8struct Foo : IFoo
9{
10    float x;
11    This foo()
12    {
13        This f;
14        f.x = 0.0;
15        return f;
16    }
17}
18
19RWStructuredBuffer<float> output;
20
21// CHECK: ([[# @LINE+1]]): error 30401
22float compute<T:Foo>(T f) // error, should be IFoo here.
23{
24}
25
26void main()
27{}