diff --git a/test/domains/compilerErrors/rect-mismatch-type-1.chpl b/test/domains/compilerErrors/rect-mismatch-type-1.chpl new file mode 100644 index 000000000000..a00a52f7bee7 --- /dev/null +++ b/test/domains/compilerErrors/rect-mismatch-type-1.chpl @@ -0,0 +1,4 @@ +// related: test/arrays/deitz/part5/test_array_uint2.chpl + +var DnsStencDom = {-1:int(8)..1:int(8), -1:int(8)..1:int(8)}; +DnsStencDom = (-1..0, -1..0); // error: int8 <- int64 diff --git a/test/domains/compilerErrors/rect-mismatch-type-1.good b/test/domains/compilerErrors/rect-mismatch-type-1.good new file mode 100644 index 000000000000..122b8257ce39 --- /dev/null +++ b/test/domains/compilerErrors/rect-mismatch-type-1.good @@ -0,0 +1 @@ +rect-mismatch-type-1.chpl:4: error: index type mismatch in domain assignment diff --git a/test/domains/compilerErrors/sparseSubdom-mismatch-1.chpl b/test/domains/compilerErrors/sparseSubdom-mismatch-1.chpl new file mode 100644 index 000000000000..02d7d5705dbc --- /dev/null +++ b/test/domains/compilerErrors/sparseSubdom-mismatch-1.chpl @@ -0,0 +1,3 @@ +use List; +const dr = {1:int(8)..8:int(8)}; +const sd: sparse subdomain(dr) = new list(int); // error: int8 <- int64 diff --git a/test/domains/compilerErrors/sparseSubdom-mismatch-1.good b/test/domains/compilerErrors/sparseSubdom-mismatch-1.good new file mode 100644 index 000000000000..2ef0511e3e29 --- /dev/null +++ b/test/domains/compilerErrors/sparseSubdom-mismatch-1.good @@ -0,0 +1 @@ +sparseSubdom-mismatch-1.chpl:3: error: cannot add a int(64) to a sparse 1-dim domain with idxType int(8) diff --git a/test/domains/compilerErrors/sparseSubdom-mismatch-2.chpl b/test/domains/compilerErrors/sparseSubdom-mismatch-2.chpl new file mode 100644 index 000000000000..c0d3e0994ff9 --- /dev/null +++ b/test/domains/compilerErrors/sparseSubdom-mismatch-2.chpl @@ -0,0 +1,3 @@ + +const dr = {1:int(8)..8:int(8)}; +const sd: sparse subdomain(dr) = 2; // error: domain <- int diff --git a/test/domains/compilerErrors/sparseSubdom-mismatch-2.good b/test/domains/compilerErrors/sparseSubdom-mismatch-2.good new file mode 100644 index 000000000000..bd6eb0e16f7d --- /dev/null +++ b/test/domains/compilerErrors/sparseSubdom-mismatch-2.good @@ -0,0 +1 @@ +sparseSubdom-mismatch-2.chpl:3: error: assigning int(64) to an irregular domain