blob: 58e7c34177f47cf5c0430dd8c17e9f39ba166f6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// setter-method.slang
//TEST:SIMPLE:
// Make sure we provide a user a diagnostic if they
// try to declare a setter method without `mutating`
// (even if we don't support `mutating` yet).
struct Sphere
{
float3 center;
float radius;
void setCenter(float3 value)
{
center = value;
}
void setRadius(float value)
{
this.radius = value;
}
};
|