Method using generics constraint inside class cause compile error
Original Reporter info from Mantis: chrish @chadilukito
-
Reporter name: Christian Hadi
Original Reporter info from Mantis: chrish @chadilukito
- Reporter name: Christian Hadi
Description:
Attached sample code for testing
Additional information:
Error messages:
=======================
Free Pascal Compiler version 3.1.1 [2017/02/24] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling generics_constraint_inside_class_bug.pp
generics_constraint_inside_class_bug.pp(25,34) Error: function header doesn't match the previous declaration "readSomething2$1:T2;"
generics_constraint_inside_class_bug.pp(11,22) Error: Found declaration: readSomething2$1:T2;
generics_constraint_inside_class_bug.pp(29,34) Error: function header doesn't match any method of this class "readSomething3$1:TGenTest$1&LtPos;BUG_GENERICS_CONSTRAINT_INSIDE_CLASS.readSomething3$1T3>;"
generics_constraint_inside_class_bug.pp(12,22) Error: Found declaration: readSomething3$1:TGenTest$1&LtPos;BUG_GENERICS_CONSTRAINT_INSIDE_CLASS.TNormalFuncTest.readSomething3$1T3>;
generics_constraint_inside_class_bug.pp(37,35) Error: function header doesn't match any method of this class "readSomething5$1(var T2);"
generics_constraint_inside_class_bug.pp(17,23) Error: Found declaration: readSomething5$1(var T2);
generics_constraint_inside_class_bug.pp(41,35) Error: function header doesn't match any method of this class "readSomething6$1(var TGenTest1
crc2ED50C58);"
generics_constraint_inside_class_bug.pp(18,23) Error: Found declaration: readSomething6$1(var TGenTest1
crcE7D92CDE);
generics_constraint_inside_class_bug.pp(46,4) Fatal: There were 8 errors compiling module, stopping
Fatal: Compilation aborted
Error: D:\fpc\3.1.1\bin\x86_64-win64\ppcx64.exe returned an error exitcode
Mantis conversion info:
- Mantis ID: 31437
- OS: Windows 10 64bit
- Build: 35475
- Platform: Windows
- Version: 3.1.1