View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038111 | pas2js | transpiler | public | 2020-11-21 22:31 | 2020-11-28 11:42 |
Reporter | Sven Barth | Assigned To | Mattias Gaertner | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | trunk | ||||
Summary | 0038111: Access violation instead of compiler error for faulty code | ||||
Description | When assigning an anonymous function with an incorrect signature to an anonymous function parameter there is at least one situation where an access violation is triggered instead of a compile error. | ||||
Steps To Reproduce | Compile attached unit. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 47613. | ||||
Attached Files |
|
|
tanonfunc.pp (697 bytes)
unit tanonfunc; {$mode objfpc} interface uses Generics.Collections; type TBuilderEntry = record Name: String; end; TBuildHistoryEntry = record end; procedure SortByDate(aAscending: Boolean); implementation uses Generics.Defaults; procedure SortByDate(aAscending: Boolean); begin specialize TComparer<TBuilderHistoryEntry>.Construct(function(const aLeft, aRight: TBuilderEntry): Integer begin if aLeft.Name > aRight.Name then Result := 1 else if aLeft.Name < aRight.Name then Result := -1 else Result := 0; if aAscending then Result := - Result; end); end; end. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-21 22:31 | Sven Barth | New Issue | |
2020-11-21 22:31 | Sven Barth | File Added: tanonfunc.pp | |
2020-11-21 22:44 | Mattias Gaertner | Assigned To | => Mattias Gaertner |
2020-11-21 22:44 | Mattias Gaertner | Status | new => assigned |
2020-11-28 11:42 | Mattias Gaertner | Status | assigned => resolved |
2020-11-28 11:42 | Mattias Gaertner | Resolution | open => fixed |
2020-11-28 11:42 | Mattias Gaertner | Fixed in Revision | => 47613. |