Przeglądaj źródła

Merged revisions 539-540,542,544-545 via svnmerge from
/trunk

git-svn-id: branches/fixes_2_0@655 -

peter 20 lat temu
rodzic
commit
f87e730a73

+ 5 - 0
.gitattributes

@@ -5305,8 +5305,10 @@ tests/webtbf/tw3740.pp svneol=native#text/plain
 tests/webtbf/tw3790.pp svneol=native#text/plain
 tests/webtbf/tw3841.pp svneol=native#text/plain
 tests/webtbf/tw3969.pp svneol=native#text/plain
+tests/webtbf/tw4103.pp svneol=native#text/plain
 tests/webtbf/tw4104.pp svneol=native#text/plain
 tests/webtbf/tw4111.pp svneol=native#text/plain
+tests/webtbf/tw4144.pp svneol=native#text/plain
 tests/webtbf/uw0744.pp svneol=native#text/plain
 tests/webtbf/uw0840a.pp svneol=native#text/plain
 tests/webtbf/uw0840b.pp svneol=native#text/plain
@@ -5314,6 +5316,7 @@ tests/webtbf/uw0856.pp svneol=native#text/plain
 tests/webtbf/uw2414.pp svneol=native#text/plain
 tests/webtbf/uw3450.pp svneol=native#text/plain
 tests/webtbf/uw3969.pp svneol=native#text/plain
+tests/webtbf/uw4103.pp svneol=native#text/plain
 tests/webtbs/tu2002.pp svneol=native#text/plain
 tests/webtbs/tw0555.pp svneol=native#text/plain
 tests/webtbs/tw0630.pp svneol=native#text/plain
@@ -5926,6 +5929,7 @@ tests/webtbs/tw3939.pp svneol=native#text/plain
 tests/webtbs/tw3953a.pp svneol=native#text/plain
 tests/webtbs/tw3953b.pp svneol=native#text/plain
 tests/webtbs/tw3967.pp svneol=native#text/plain
+tests/webtbs/tw3968.pp svneol=native#text/plain
 tests/webtbs/tw3970.pp svneol=native#text/plain
 tests/webtbs/tw3971.pp svneol=native#text/plain
 tests/webtbs/tw3973.pp svneol=native#text/plain
@@ -5981,6 +5985,7 @@ tests/webtbs/uw3356.pp svneol=native#text/plain
 tests/webtbs/uw3429.pp svneol=native#text/plain
 tests/webtbs/uw3474a.pp svneol=native#text/plain
 tests/webtbs/uw3474b.pp svneol=native#text/plain
+tests/webtbs/uw3968.pp svneol=native#text/plain
 utils/Makefile svneol=native#text/plain
 utils/Makefile.fpc svneol=native#text/plain
 utils/README -text

+ 2 - 1
compiler/pdecl.pas

@@ -525,7 +525,8 @@ implementation
                 This need to be done after the rtti has been written, because
                 it can contain a reference to that data (PFV)
                 This is not for forward classes }
-              if (tt.def.deftype=objectdef) then
+              if (tt.def.deftype=objectdef) and
+                 (tt.def.owner.symtabletype in [staticsymtable,globalsymtable]) then
                 with Tobjectdef(tt.def) do
                   begin
                     if not(oo_is_forward in objectoptions) then

+ 4 - 2
compiler/symsym.pas

@@ -1020,10 +1020,12 @@ implementation
              begin
                i:=0;
                { ignore vs_hidden parameters }
-               while assigned(pd^.def.paras[i]) and
+               while (i<pd^.def.paras.count) and
+                     assigned(pd^.def.paras[i]) and
                      (vo_is_hidden_para in tparavarsym(pd^.def.paras[i]).varoptions) do
                  inc(i);
-               if assigned(pd^.def.paras[i]) then
+               if (i<pd^.def.paras.count) and
+                  assigned(pd^.def.paras[i]) then
                 begin
                   eq:=compare_defs_ext(fromdef,tparavarsym(pd^.def.paras[i]).vartype.def,nothingn,convtyp,hpd,[]);
 

+ 12 - 0
tests/webtbf/tw4103.pp

@@ -0,0 +1,12 @@
+{ %fail }
+
+{ Source provided for Free Pascal Bug Report 4103 }
+{ Submitted by "Daniël Mantione" on  2005-06-21 }
+{ e-mail: [email protected] }
+uses uw4103;
+
+var j:junk;
+
+begin
+  j:=1;
+end.

+ 16 - 0
tests/webtbf/tw4144.pp

@@ -0,0 +1,16 @@
+{ %fail }
+
+{ Source provided for Free Pascal Bug Report 4144 }
+{ Submitted by "Wiktor Sywula" on  2005-06-30 }
+{ e-mail: [email protected] }
+procedure foo;
+type
+   bar = object
+     constructor init;
+     procedure zzyzzy; virtual;
+   end;
+begin
+end;
+
+begin
+end.

+ 31 - 0
tests/webtbf/uw4103.pp

@@ -0,0 +1,31 @@
+unit uw4103;
+
+interface
+
+type    junk=record
+            data:string;
+        end;
+
+operator :=(const s:string) result:junk;
+
+implementation
+
+operator :=(const s:string) result:junk;
+
+begin
+  result.data:=s;
+end;
+
+operator :=(const n:longint) result:junk;
+
+begin
+  str(n,result.data);
+end;
+
+operator :=(const n:cardinal) result:junk;
+
+begin
+  str(n,result.data);
+end;
+
+end.

+ 6 - 0
tests/webtbs/tw3968.pp

@@ -0,0 +1,6 @@
+{ %recompile }
+
+uses uw3968;
+begin
+  WriteLn(Ord(High(Tabc)));
+end.

+ 10 - 0
tests/webtbs/uw3968.pp

@@ -0,0 +1,10 @@
+{ Source provided for Free Pascal Bug Report 3968 }
+{ Submitted by "C Western" on  2005-05-14 }
+{ e-mail: [email protected] }
+unit uw3968;
+interface
+type
+ Tabcde = (a=0,b,c,d,e);
+ Tabc = a..c;
+implementation
+end.