View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026452 | FPC | Compiler | public | 2014-07-05 13:42 | 2019-08-30 15:14 |
Reporter | Boris Popov | Assigned To | Sven Barth | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | duplicate | ||
Platform | x64 | OS | Ubuntu 12.04 | ||
Product Version | 2.7.1 | ||||
Summary | 0026452: Internal error 2012101001 with forward template declaration | ||||
Description | Compile always fails with cryptic error message: rtempl.pas(10,27) Fatal: Internal error 2012101001 Fatal: Compilation aborted | ||||
Steps To Reproduce | Compile the following code: program rtempl; {$mode delphi} type TArray<T> = class; TList<T> = class public function fn1: TArray<T>; end; TArray<T> = class function fn2: TList<T>; end; begin end. | ||||
Tags | generics, internal error | ||||
Fixed in Revision | |||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
duplicate of | 0034128 | acknowledged | Support for forward declarations of generic types |
|
This is not a cryptic error, but an internal error which means that some expectation of the compiler didn't hold up. Since the numbers of internal errors are unique their location is easily to pinpoint. In that regard they are the best kind of errors ;) Regarding your problem at hand: forward declarations of generics are not supported. Regards, Sven |
|
Yeah, I've found this error by grepping, but resulting condition wasn't less cryptic to me :). Are there any workaround for the above case? I'm writing an interface to C++ library which heavy uses such declarations and the only solution found was to use generic pointers instead of forward declarations. |
|
I'm resolving this as a duplicate for the younger one as that has a potential patch attached. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-05 13:42 | Boris Popov | New Issue | |
2014-07-05 20:56 | Sven Barth | Note Added: 0076088 | |
2014-07-05 20:56 | Sven Barth | Tag Attached: generics | |
2014-07-05 20:56 | Sven Barth | Tag Attached: internal error | |
2014-07-06 09:52 | Boris Popov | Note Added: 0076098 | |
2019-08-30 15:14 | Sven Barth | Assigned To | => Sven Barth |
2019-08-30 15:14 | Sven Barth | Status | new => resolved |
2019-08-30 15:14 | Sven Barth | Resolution | open => duplicate |
2019-08-30 15:14 | Sven Barth | FPCTarget | => - |
2019-08-30 15:14 | Sven Barth | Note Added: 0117878 | |
2019-08-30 15:14 | Sven Barth | Relationship added | duplicate of 0034128 |