Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2891 from 9rnsr/fix11525
[REG2.065a] Issue 11525 - Error: 'a[] *= a[]' each element is not a scalar, it is a Complex!double
- Loading branch information
Showing
3 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice11376.d(17): Error: invalid array operation 'x1[] = x2[] * x3[]' because X doesn't support necessary arithmetic operations | ||
fail_compilation/ice11376.d(21): Error: invalid array operation 's2[] += s1[]' because string is not a scalar type | ||
fail_compilation/ice11376.d(25): Error: invalid array operation 'pa1[] *= pa2[]' for element type int* | ||
--- | ||
*/ | ||
|
||
void main() | ||
{ | ||
struct X { } | ||
|
||
auto x1 = [X()]; | ||
auto x2 = [X()]; | ||
auto x3 = [X()]; | ||
x1[] = x2[] * x3[]; | ||
|
||
string[] s1; | ||
string[] s2; | ||
s2[] += s1[]; | ||
|
||
int*[] pa1; | ||
int*[] pa2; | ||
pa1[] *= pa2[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters