View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038115 | FPC | Compiler | public | 2020-11-22 13:42 | 2020-11-22 13:47 |
Reporter | OkobaPatino | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 3.3.1 | ||||
Summary | 0038115: Set var to a procedure with a different param type | ||||
Description | FPC allows setting T to TestInt2, although the params are different. It should raise an error like setting it to TestString as TInt1 and TInt2 are independent. program Project1; type TInt1 = type integer; PInt1 = ^TInt1; TInt2 = type integer; PInt2 = ^TInt2; TTestInt1 = procedure(A: PInt1); TTestInt2 = procedure(A: PInt2); procedure TestInt1(A: PInt1); begin WriteLn('1'); end; procedure TestInt2(A: PInt2); begin WriteLn('2'); end; procedure TestString(A: PString); begin end; var T: TTestInt1; begin T := @TestInt2; //Allows this T := @TestString; //Does not allow this end. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-22 13:42 | OkobaPatino | New Issue | |
2020-11-22 13:47 | Sven Barth | Note Added: 0127102 |