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

* fix for Mantis #35918: don't set the mangledname for the attribute's constructor function; let the compiler do its job instead

git-svn-id: trunk@42560 -
svenbarth 6 жил өмнө
parent
commit
6952ab5baf

+ 4 - 0
.gitattributes

@@ -17774,6 +17774,7 @@ tests/webtbs/tw35878.pp svneol=native#text/plain
 tests/webtbs/tw35878a.pp svneol=native#text/plain
 tests/webtbs/tw35886.pp svneol=native#text/plain
 tests/webtbs/tw3589.pp svneol=native#text/plain
+tests/webtbs/tw35918.pp svneol=native#text/pascal
 tests/webtbs/tw3594.pp svneol=native#text/plain
 tests/webtbs/tw3595.pp svneol=native#text/plain
 tests/webtbs/tw3612.pp svneol=native#text/plain
@@ -18347,6 +18348,9 @@ tests/webtbs/uw34287b.pp svneol=native#text/pascal
 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/uw35918a.pp svneol=native#text/pascal
+tests/webtbs/uw35918b.pp svneol=native#text/pascal
+tests/webtbs/uw35918c.pp svneol=native#text/pascal
 tests/webtbs/uw3968.pp svneol=native#text/plain
 tests/webtbs/uw4056.pp svneol=native#text/plain
 tests/webtbs/uw4140.pp svneol=native#text/plain

+ 0 - 1
compiler/symcreat.pas

@@ -1498,7 +1498,6 @@ implementation
           insert_funcret_para(pd);
           pd.calcparas;
           pd.forwarddef:=false;
-          pd.setmangledname(ps.name);
           pd.aliasnames.insert(pd.mangledname);
           handle_calling_convention(pd,hcc_default_actions_impl);
           { set procinfo and current_procinfo.procdef }

+ 11 - 0
tests/webtbs/tw35918.pp

@@ -0,0 +1,11 @@
+{ %NORUN }
+
+program tw35918;
+
+uses uw35918a, uw35918b, uw35918c;
+
+begin
+  TTest1.Create.Free;
+  TTest2.Create.Free;
+end.
+

+ 28 - 0
tests/webtbs/uw35918a.pp

@@ -0,0 +1,28 @@
+unit uw35918a;
+
+{$mode objfpc}{$H+}  
+{$ModeSwitch prefixedattributes}
+
+interface
+
+uses
+  Classes, SysUtils, uw35918c;
+
+type
+
+  { TTest1 }
+
+  { TTest2 }
+
+  TTest2 = class
+  private
+    FField2: String;
+  published
+    [Attruvute()]
+    property Field2: String read FField2;
+  end;
+
+implementation
+
+end.
+

+ 26 - 0
tests/webtbs/uw35918b.pp

@@ -0,0 +1,26 @@
+unit uw35918b;
+
+{$mode objfpc}{$H+}
+{$ModeSwitch prefixedattributes}
+
+interface
+
+uses
+  Classes, SysUtils, uw35918c;
+
+type
+
+  { TTest1 }
+
+  TTest1 = class
+  private
+    FField1: String;
+  published
+    [Attruvute()]
+    property Field1: String read FField1;
+  end;
+
+implementation
+
+end.
+

+ 29 - 0
tests/webtbs/uw35918c.pp

@@ -0,0 +1,29 @@
+unit uw35918c;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils;
+
+type
+
+  { Attruvute }
+
+  Attruvute = class(TCustomAttribute)
+  public
+    constructor Create;
+  end;
+
+implementation
+
+{ Attruvute }
+
+constructor Attruvute.Create;
+begin
+
+end;
+
+end.
+