Internal error 2014052306 on generic type misuse
Original Reporter info from Mantis: TrogloGeek
-
Reporter name: Damien VERON
Original Reporter info from Mantis: TrogloGeek
- Reporter name: Damien VERON
Description:
Using (by mistake) a nested type from unspecialized generic types yields an Internal error 2014052306 with no helpful message to correct your code.
Steps to reproduce:
program error2014052306;
{$mode objfpc}{$H+}
uses
Classes, SysUtils
{ you can add units after this },
gutil, gset;
type
TIntegerSetCompare = specialize TLess<Integer>;
TIntegerSet = specialize TSet<Integer, TIntegerSetCompare>;
var
ISet: TIntegerSet;
I: Integer;
Iterator: TSet.TIterator; //should be TIntegerSet.TIterator;
begin
ISet := TIntegerSet.Create();
Iterator := ISet.Find(42); //error2014052306.lpr(20,12) Error: Internal error 2014052306
end.
Mantis conversion info:
- Mantis ID: 31973
- OS: Ubuntu
- OS Build: 16.04.2 4.4.0-78
- Build: 2017/02/25
- Platform: Linux x86_64
- Version: 3.0.2
- Fixed in version: 3.1.1
- Fixed in revision: 36468 (#eb9b4fb7)
- Monitored by: » TrogloGeek (Damien VERON)