Merged revisions 497-498 via svnmerge from

/trunk

git-svn-id: branches/fixes_2_0@518 -
This commit is contained in:
peter 2005-06-29 09:06:15 +00:00
parent 434b886b63
commit 31549530e2
3 changed files with 14 additions and 1 deletions

1
.gitattributes vendored
View File

@ -5936,6 +5936,7 @@ tests/webtbs/tw4055.pp svneol=native#text/plain
tests/webtbs/tw4058.pp svneol=native#text/plain
tests/webtbs/tw4078.pp svneol=native#text/plain
tests/webtbs/tw4089.pp svneol=native#text/plain
tests/webtbs/tw4115.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -652,7 +652,7 @@ implementation
{ maybe type conversion for the index value, but
do not convert enums,booleans,char }
if (right.resulttype.def.deftype<>enumdef) and
not(is_char(right.resulttype.def)) and
not(is_char(right.resulttype.def) or is_widechar(right.resulttype.def)) and
not(is_boolean(right.resulttype.def)) then
begin
inserttypeconv(right,sinttype);

12
tests/webtbs/tw4115.pp Normal file
View File

@ -0,0 +1,12 @@
{ Source provided for Free Pascal Bug Report 4115 }
{ Submitted by "Alexey Chernobayev" on 2005-06-25 }
{ e-mail: alexch@caravan.ru }
var
A: array [WideChar] of Char;
W: WideChar;
begin
A['a'] := 'b'; // Ok
W := 'c';
A[W] := 'd';
end.