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

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

florian 1 жил өмнө
parent
commit
2d1fba1fa1

+ 2 - 1
compiler/pdecsub.pas

@@ -410,9 +410,10 @@ implementation
                 if (m_mac in current_settings.modeswitches) then
                   is_univ:=try_to_consume(_UNIV);
 
+                { this is not really working and generates internal errors
                 if try_to_consume(_TYPE) then
                   hdef:=ctypedformaltype
-                else
+                else }
                   begin
                     block_type:=bt_var_type;
                     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.