* fixed internalerror after invalid type node in subscript node

(mantis #22395)

git-svn-id: trunk@21917 -
This commit is contained in:
Jonas Maebe 2012-07-15 18:17:29 +00:00
parent a38be24672
commit b1d00b66ac
3 changed files with 16 additions and 2 deletions

1
.gitattributes vendored
View File

@ -11674,6 +11674,7 @@ tests/webtbf/tw2174.pp svneol=native#text/plain
tests/webtbf/tw21873.pp svneol=native#text/plain
tests/webtbf/tw2209.pp svneol=native#text/plain
tests/webtbf/tw22219.pp svneol=native#text/pascal
tests/webtbf/tw22395.pp svneol=native#text/plain
tests/webtbf/tw2242.pp svneol=native#text/plain
tests/webtbf/tw2273.pp svneol=native#text/plain
tests/webtbf/tw2281.pp svneol=native#text/plain

View File

@ -1229,9 +1229,9 @@ implementation
Only when the allowed flag is set we don't generate
an error }
if not allowed then
Message(parser_e_no_type_not_allowed_here);
CGMessage(parser_e_no_type_not_allowed_here);
if not helperallowed and is_objectpascal_helper(typedef) then
Message(parser_e_no_category_as_types);
CGMessage(parser_e_no_category_as_types);
end;

13
tests/webtbf/tw22395.pp Normal file
View File

@ -0,0 +1,13 @@
{ %fail }
program test;
type
trec = record
i: int64;
end;
var
R: QWord;
begin
R := QWord(trec.i);
end.