View Issue Details

IDProjectCategoryView StatusLast Update
0001115Ecere SDKcompilerpublic2016-08-04 21:02
Reporterredj Assigned Tojerome  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platform-crossplatformOS-OS Version-
Product Version0.44.10 64 
Target Version0.44.15Fixed in Version0.44.15 
Summary0001115: container inheritance bug / template bug due to order of definition
Descriptionruntime issue with container/template class definition order
Steps To Reproduceimport "ecere"
// Problem only happens if Foos precedes Foo
class Foos : List<Foo> { }
class Foo { }
class App : Application
{
   void Main()
   {
      Foos foos { };
      foos.Add({});
      foos.Free();
   }
}

https://gist.github.com/jerstlouis/12d10163b9edbf004b0514914030d03a
Additional Informationexperimental fix by jerome

diff --git a/ecere/src/com/instance.ec b/ecere/src/com/instance.ec
index ee5a4ee..7ce4dbe 100644
--- a/ecere/src/com/instance.ec
+++ b/ecere/src/com/instance.ec
@@ -3712,6 +3712,11 @@ static void ComputeClassParameters(Class templatedClass, const char * templatePa
                      argument.dataTypeClass = eSystem_FindClass(_class.module, value);
                   if(!argument.dataTypeClass)
                      argument.dataTypeClass = eSystem_FindClass(_class.module.application, value);
+ if(!argument.dataTypeClass)
+ {
+ argument.dataTypeClass = eSystem_RegisterClass(0, value, null, 0,0, null, null, _class.module, publicAccess, publicAccess);
+ argument.dataTypeClass.internalDecl = true;
+ }
                   break;
                case expression:
                {

https://gist.github.com/jerstlouis/3cb8e103c90894274aad28f6a521c8f3
TagsNo tags attached.

Issue History

Date Modified Username Field Change
2016-07-25 23:47 redj New Issue
2016-07-25 23:47 redj Status new => assigned
2016-07-25 23:47 redj Assigned To => jerome
2016-08-03 12:55 jerome Note Added: 0001396
2016-08-03 12:55 jerome Status assigned => resolved
2016-08-03 12:55 jerome Fixed in Version => 0.44.15
2016-08-03 12:55 jerome Resolution open => fixed
2016-08-04 21:02 jerome Note Added: 0001434
2016-08-04 21:02 jerome Status resolved => closed