Parcourir la source

* fixed mantis 7173 (properly check parameters in unit
implementation in Delphi/TP mode if they are repeated)

git-svn-id: trunk@5682 -

Jonas Maebe il y a 18 ans
Parent
commit
f3f8a76559
3 fichiers modifiés avec 24 ajouts et 1 suppressions
  1. 1 0
      .gitattributes
  2. 0 1
      compiler/pdecsub.pas
  3. 23 0
      tests/webtbs/tw7173.pp

+ 1 - 0
.gitattributes

@@ -7770,6 +7770,7 @@ tests/webtbs/tw7104.pp svneol=native#text/plain
 tests/webtbs/tw7105.pp svneol=native#text/plain
 tests/webtbs/tw7143.pp -text
 tests/webtbs/tw7161.pp svneol=native#text/plain
+tests/webtbs/tw7173.pp svneol=native#text/plain
 tests/webtbs/tw7195.pp svneol=native#text/plain
 tests/webtbs/tw7227.pp svneol=native#text/plain
 tests/webtbs/tw7276.pp svneol=native#text/plain

+ 0 - 1
compiler/pdecsub.pas

@@ -2457,7 +2457,6 @@ const
                      also the parameters must match also with the type }
                    if (fwpd.proctypeoption<>currpd.proctypeoption) or
                       (
-                       (m_repeat_forward in current_settings.modeswitches) and
                        (not((currpd.maxparacount=0) or
                             (compare_paras(currpd.paras,fwpd.paras,cp_all,[cpo_comparedefaultvalue])>=te_equal)))
                       ) or

+ 23 - 0
tests/webtbs/tw7173.pp

@@ -0,0 +1,23 @@
+{ %norun }
+{ %fail }
+
+{$mode delphi}
+unit tw7173;
+
+interface
+
+uses
+  SysUtils;
+
+function GetVal(astr : string) : Integer;
+
+
+implementation
+
+function GetVal(const astr : string) : Integer;
+begin
+  Result := StrToInt(astr);
+end;
+
+
+end.