| Bug # | Delphi versions | Description |
| 134 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
It is possible to 'use' the current unit in the Implementation section without errors |
| 495 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
The compiler accepts that a subroutine declared as a function is implemented as a procedure and the other way around. |
Bug #134; last modified: 12-Jul-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Exists | Unknown | Unknown | Fixed | Fixed | Fixed | Fixed |
Unit MyUnit;
Interface
Implementation
Uses MyUnit; { this should not compile }
End.
The above code compiles happily. For example in Borland Pascal 7.0 the
above fails with error message "Identifier redeclared.". If the Uses clause
is moved to the Interface section, Delphi doesn't compile the unit.
Bug #495; last modified: 28-Oct-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Absent | Absent | Absent | Absent | Exists | Exists | Exists |
interface
function func: Integer;
procedure proc;
implementation
procedure func;
begin
Result := 10;
ShowMessage('func');
end;
function proc;
begin
ShowMessage('proc');
end;
These are compiled without complaints. This not only 'works' for subroutines in
an interface, but also for methods of objects.