浏览代码

* fixed #8156

git-svn-id: trunk@6101 -
florian 18 年之前
父节点
当前提交
7d3d64e2ec
共有 3 个文件被更改,包括 20 次插入0 次删除
  1. 1 0
      .gitattributes
  2. 11 0
      compiler/pdecl.pas
  3. 8 0
      tests/webtbs/tw8156.pp

+ 1 - 0
.gitattributes

@@ -7989,6 +7989,7 @@ tests/webtbs/tw8145.pp svneol=native#text/plain
 tests/webtbs/tw8148.pp svneol=native#text/plain
 tests/webtbs/tw8150a.pp svneol=native#text/plain
 tests/webtbs/tw8150d.pp svneol=native#text/plain
+tests/webtbs/tw8156.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 11 - 0
compiler/pdecl.pas

@@ -493,6 +493,17 @@ implementation
                   if isunique then
                     begin
                       hdef:=tstoreddef(hdef).getcopy;
+
+                      { fix name, it is used e.g. for tables }
+                      if is_class_or_interface_or_dispinterface(hdef) then
+                        with tobjectdef(hdef) do
+                          begin
+                            stringdispose(objname);
+                            stringdispose(objrealname);
+                            objrealname:=stringdup(orgtypename);
+                            objname:=stringdup(upper(orgtypename));
+                          end;
+
                       include(hdef.defoptions,df_unique);
                     end;
                   if not assigned(hdef.typesym) then

+ 8 - 0
tests/webtbs/tw8156.pp

@@ -0,0 +1,8 @@
+{$mode objfpc}
+
+type
+  A = type IInterface;
+  B = type IInterface;
+
+begin
+end.