소스 검색

* fixed internalerror after invalid type node in subscript node
(mantis #22395)

git-svn-id: trunk@21917 -

Jonas Maebe 13 년 전
부모
커밋
b1d00b66ac
3개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      .gitattributes
  2. 2 2
      compiler/nld.pas
  3. 13 0
      tests/webtbf/tw22395.pp

+ 1 - 0
.gitattributes

@@ -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

+ 2 - 2
compiler/nld.pas

@@ -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 - 0
tests/webtbf/tw22395.pp

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