Issue error if any complex assignment operator is used with a struct type.
Issue #275.
This commit is contained in:
8
tests_errors/struct_arith.ispc
Normal file
8
tests_errors/struct_arith.ispc
Normal file
@@ -0,0 +1,8 @@
|
||||
// Assignment operator "+=" is illegal with struct type
|
||||
|
||||
struct Point { float x, y, z; };
|
||||
|
||||
void foo() {
|
||||
Point a = {1,2,3}, b = {4,5,6};
|
||||
a += b;
|
||||
}
|
||||
Reference in New Issue
Block a user