* fixed checking whether first character of a selector is valid (patch by

Dmitry Boyarintsev, mantis #14680)

git-svn-id: branches/objc@13768 -
This commit is contained in:
Jonas Maebe 2009-09-28 08:40:27 +00:00
parent ef39dff478
commit 3f0eee741a
3 changed files with 20 additions and 2 deletions

1
.gitattributes vendored
View File

@ -8613,6 +8613,7 @@ tests/test/tobjc2.pp svneol=native#text/plain
tests/test/tobjc20.pp svneol=native#text/plain
tests/test/tobjc21.pp svneol=native#text/plain
tests/test/tobjc22.pp svneol=native#text/plain
tests/test/tobjc23.pp svneol=native#text/plain
tests/test/tobjc3.pp svneol=native#text/plain
tests/test/tobjc4.pp svneol=native#text/plain
tests/test/tobjc4a.pp svneol=native#text/plain

View File

@ -94,9 +94,8 @@ begin
else
begin
{ no special characters other than ':'
(already checked character 0, so start checking from 1)
}
for i:=1 to len-1 do
for i:=0 to len-1 do
if (value_str[i] = ':') then
gotcolon:=true
else if not(value_str[i] in ['_','A'..'Z','a'..'z','0'..'9',':']) then

18
tests/test/tobjc23.pp Normal file
View File

@ -0,0 +1,18 @@
{ %fail }
{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{$modeswitch objectivec1}
type
ta = objcclass
{ should give an error because the selector name is invalid }
procedure test(l:longint); message '?test:';
end;
procedure ta.test(l:longint);
begin
end;
begin
end.