Browse Source

* disable (type ...), it did never work and there are not test, resolves #40562

florian 1 year ago
parent
commit
2d1fba1fa1
2 changed files with 12 additions and 1 deletions
  1. 2 1
      compiler/pdecsub.pas
  2. 10 0
      tests/webtbf/tw40562.pp

+ 2 - 1
compiler/pdecsub.pas

@@ -410,9 +410,10 @@ implementation
                 if (m_mac in current_settings.modeswitches) then
                 if (m_mac in current_settings.modeswitches) then
                   is_univ:=try_to_consume(_UNIV);
                   is_univ:=try_to_consume(_UNIV);
 
 
+                { this is not really working and generates internal errors
                 if try_to_consume(_TYPE) then
                 if try_to_consume(_TYPE) then
                   hdef:=ctypedformaltype
                   hdef:=ctypedformaltype
-                else
+                else }
                   begin
                   begin
                     block_type:=bt_var_type;
                     block_type:=bt_var_type;
                     single_type(hdef,[stoAllowSpecialization]);
                     single_type(hdef,[stoAllowSpecialization]);

+ 10 - 0
tests/webtbf/tw40562.pp

@@ -0,0 +1,10 @@
+{ %fail }
+program Project1;
+
+procedure Foo(b: type );
+begin
+end;
+
+begin
+  foo(1); // error here
+end.