We were (unintentionally) only using structural equivalence to compare struct types.
Now we require that the struct name match for two struct types to be the same. Added a test to check this. (Also removed a stale test, movmsk-opt.ispc)
This commit is contained in:
14
tests_errors/struct_type_equality.ispc
Normal file
14
tests_errors/struct_type_equality.ispc
Normal file
@@ -0,0 +1,14 @@
|
||||
// Can't convert between different struct types "uniform struct Foo" and "uniform struct Bar"
|
||||
|
||||
struct Foo {
|
||||
int a;
|
||||
};
|
||||
|
||||
struct Bar {
|
||||
int x;
|
||||
};
|
||||
|
||||
void f(Foo a) {
|
||||
Bar b;
|
||||
b =a;
|
||||
}
|
||||
Reference in New Issue
Block a user