diff options
Diffstat (limited to 'tests/test/units/variants/tw26370.pp')
-rw-r--r-- | tests/test/units/variants/tw26370.pp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test/units/variants/tw26370.pp b/tests/test/units/variants/tw26370.pp new file mode 100644 index 0000000000..ae816390a4 --- /dev/null +++ b/tests/test/units/variants/tw26370.pp @@ -0,0 +1,19 @@ +{$mode objfpc} +uses Variants; + +procedure test; +var + Bounds: Array [0..1] of TVarArrayBound; + V1, V2: Variant; +begin + Bounds[0].lowbound := 0; + Bounds[0].elementcount := 1; + Bounds[1].lowbound := 0; + Bounds[1].elementcount := 0; + V1 := VarArrayCreate(@Bounds, 2, varVariant); + V2 := V1; // <- Exception EVariantBadIndexError!!!!! +end; + +begin + test; +end.
\ No newline at end of file |