2
0
Эх сурвалжийг харах

* qwordbool is obviously a 64 bit type, resolves #20889

git-svn-id: trunk@19911 -
florian 13 жил өмнө
parent
commit
61eb25ea30

+ 1 - 0
.gitattributes

@@ -11975,6 +11975,7 @@ tests/webtbs/tw20836.pp svneol=native#text/pascal
 tests/webtbs/tw20872a.pp svneol=native#text/pascal
 tests/webtbs/tw20872a.pp svneol=native#text/pascal
 tests/webtbs/tw20872b.pp svneol=native#text/pascal
 tests/webtbs/tw20872b.pp svneol=native#text/pascal
 tests/webtbs/tw20872c.pp svneol=native#text/pascal
 tests/webtbs/tw20872c.pp svneol=native#text/pascal
+tests/webtbs/tw20889.pp svneol=native#text/pascal
 tests/webtbs/tw2109.pp svneol=native#text/plain
 tests/webtbs/tw2109.pp svneol=native#text/plain
 tests/webtbs/tw2110.pp svneol=native#text/plain
 tests/webtbs/tw2110.pp svneol=native#text/plain
 tests/webtbs/tw2128.pp svneol=native#text/plain
 tests/webtbs/tw2128.pp svneol=native#text/plain

+ 1 - 1
compiler/defutil.pas

@@ -762,7 +762,7 @@ implementation
     { true, if def is a 64 bit type }
     { true, if def is a 64 bit type }
     function is_64bit(def : tdef) : boolean;
     function is_64bit(def : tdef) : boolean;
       begin
       begin
-         is_64bit:=(def.typ=orddef) and (torddef(def).ordtype in [u64bit,s64bit,scurrency])
+         is_64bit:=(def.typ=orddef) and (torddef(def).ordtype in [u64bit,s64bit,scurrency,pasbool64,bool64bit])
       end;
       end;
 
 
 
 

+ 19 - 0
tests/webtbs/tw20889.pp

@@ -0,0 +1,19 @@
+{$APPTYPE CONSOLE}
+program qwordbool_test_02;
+//=====================
+//
+// Using function which returns QWORDBOOL leads to 'Internal error 200410105' during compile in some usage patterns
+//
+// r19740-win32
+//
+//=====================
+// Sample:
+//
+function qbool_result(something:integer):qwordbool;
+begin qbool_result:=(something<>0);
+      end;
+
+var   test:boolean;
+begin test:=qbool_result(123);  //here(17,13) Fatal: Internal error 200410105
+      writeln(test);
+      end.