mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-19 05:49:47 +01:00
* 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:
parent
ef39dff478
commit
3f0eee741a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8613,6 +8613,7 @@ tests/test/tobjc2.pp svneol=native#text/plain
|
|||||||
tests/test/tobjc20.pp svneol=native#text/plain
|
tests/test/tobjc20.pp svneol=native#text/plain
|
||||||
tests/test/tobjc21.pp svneol=native#text/plain
|
tests/test/tobjc21.pp svneol=native#text/plain
|
||||||
tests/test/tobjc22.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/tobjc3.pp svneol=native#text/plain
|
||||||
tests/test/tobjc4.pp svneol=native#text/plain
|
tests/test/tobjc4.pp svneol=native#text/plain
|
||||||
tests/test/tobjc4a.pp svneol=native#text/plain
|
tests/test/tobjc4a.pp svneol=native#text/plain
|
||||||
|
|||||||
@ -94,9 +94,8 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ no special characters other than ':'
|
{ 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
|
if (value_str[i] = ':') then
|
||||||
gotcolon:=true
|
gotcolon:=true
|
||||||
else if not(value_str[i] in ['_','A'..'Z','a'..'z','0'..'9',':']) then
|
else if not(value_str[i] in ['_','A'..'Z','a'..'z','0'..'9',':']) then
|
||||||
|
|||||||
18
tests/test/tobjc23.pp
Normal file
18
tests/test/tobjc23.pp
Normal 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.
|
||||||
Loading…
Reference in New Issue
Block a user