diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-09-03 15:55:26 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-09-03 15:55:26 +0000 |
commit | 186bd3c3efa2f644fd9ef4afd1820607f39c8651 (patch) | |
tree | a0ce31e9e8ed05a4b3aec2997fad531974f4c004 /tests/webtbf | |
parent | 3564701c55ce4419871a8fdff6628bdaffb05d29 (diff) | |
download | fpc-186bd3c3efa2f644fd9ef4afd1820607f39c8651.tar.gz |
* fixed mantis #9522: no longer allow typecasting ordinal constants
to complex types (caused a lot of internal errors later on, and
was also Delphi-incompatible)
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@8369 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbf')
-rw-r--r-- | tests/webtbf/tw3812.pp | 18 | ||||
-rw-r--r-- | tests/webtbf/tw9522.pp | 7 | ||||
-rw-r--r-- | tests/webtbf/tw9522a.pp | 7 | ||||
-rw-r--r-- | tests/webtbf/tw9522b.pp | 7 | ||||
-rw-r--r-- | tests/webtbf/tw9522c.pp | 7 | ||||
-rw-r--r-- | tests/webtbf/tw9522d.pp | 8 | ||||
-rw-r--r-- | tests/webtbf/tw9522e.pp | 8 |
7 files changed, 62 insertions, 0 deletions
diff --git a/tests/webtbf/tw3812.pp b/tests/webtbf/tw3812.pp new file mode 100644 index 0000000000..627c097e26 --- /dev/null +++ b/tests/webtbf/tw3812.pp @@ -0,0 +1,18 @@ +{ %fail } + +{ Source provided for Free Pascal Bug Report 3812 } +{ Submitted by "Sergey@michint" on 2005-03-22 } +{ e-mail: } +type + LARGE_INTEGER = record + LowPart : Cardinal; + HighPart : LongInt; + end; + +procedure t(li1: Large_Integer); stdcall; +begin +end; + +begin + t(Large_Integer(1111111111111111)); +end. diff --git a/tests/webtbf/tw9522.pp b/tests/webtbf/tw9522.pp new file mode 100644 index 0000000000..b37efbb109 --- /dev/null +++ b/tests/webtbf/tw9522.pp @@ -0,0 +1,7 @@ +{ %fail } + +type T4Char = array[0..3] of char; +begin + writeln(T4Char(65)[0]); +end. + diff --git a/tests/webtbf/tw9522a.pp b/tests/webtbf/tw9522a.pp new file mode 100644 index 0000000000..18ad6dd6aa --- /dev/null +++ b/tests/webtbf/tw9522a.pp @@ -0,0 +1,7 @@ +{ %fail } + +type T4Char = array[0..3] of char; +begin + writeln(ansistring(65)); +end. + diff --git a/tests/webtbf/tw9522b.pp b/tests/webtbf/tw9522b.pp new file mode 100644 index 0000000000..e57bc8df6b --- /dev/null +++ b/tests/webtbf/tw9522b.pp @@ -0,0 +1,7 @@ +{ %fail } + +type ts = set of 0..7; +begin + writeln(1 in ts(65)); +end. + diff --git a/tests/webtbf/tw9522c.pp b/tests/webtbf/tw9522c.pp new file mode 100644 index 0000000000..56fc0bd93a --- /dev/null +++ b/tests/webtbf/tw9522c.pp @@ -0,0 +1,7 @@ +{ %fail } + +type ts = string[1]; +begin + writeln(ts(65)); +end. + diff --git a/tests/webtbf/tw9522d.pp b/tests/webtbf/tw9522d.pp new file mode 100644 index 0000000000..a58cedf269 --- /dev/null +++ b/tests/webtbf/tw9522d.pp @@ -0,0 +1,8 @@ +{ %fail } + +type + tr = record b: byte; end; +begin + writeln(tr(65).b); +end. + diff --git a/tests/webtbf/tw9522e.pp b/tests/webtbf/tw9522e.pp new file mode 100644 index 0000000000..95c344ffe4 --- /dev/null +++ b/tests/webtbf/tw9522e.pp @@ -0,0 +1,8 @@ +{ %fail } + +type + tobj = object b : byte; end; +begin + writeln(tobj(65).b); +end. + |