@@ -0,0 +1,17 @@
+{ %NORUN }
+{ %EXPECTMSGS=5024 }
+{ %OPT=-vh }
+
+program tb0718;
+{$warn 5024 off}
+{$warn 5024 on}
+procedure Test(aArg: LongInt);
+begin
+end;
+ Test(42);
+end.
@@ -0,0 +1,27 @@
+{$push}
+ { message 5024 should be hidden for this }
+{$pop}
+procedure Test2(aArg: LongInt);
+ { message 5024 should be visible for this }
+ Test2(42);
@@ -0,0 +1,35 @@
+program tgeneric119;
+{$mode objfpc}
+{$warn 5024 error}
+{$warn 5036 error}
+type
+ generic TTest<T> = class
+ procedure Test(aArg: T);
+ end;
+procedure TTest.Test(aArg: T);
+var
+ v: LongInt;
+ {$push}
+ {$warn 5036 off}
+ Writeln(v);
+ {$pop}
+ TTestLongInt = specialize TTest<LongInt>;
+ t: TTestLongInt;
+ t := TTestLongInt.Create;
+ t.Free;
@@ -0,0 +1,30 @@
+{ %OPT=-Sew }
+program tgeneric120;
+ constructor Create; virtual;
+ {$warn 3018 off}
+ generic TTestSub<T> = class(specialize TTest<T>)
+ protected
+ constructor Create; override;
+constructor TTest.Create;
+constructor TTestSub.Create;
@@ -0,0 +1,37 @@
+program tgeneric121;
+ generic TTestSub2<T> = class(specialize TTestSub<T>)