View Issue Details

IDProjectCategoryView StatusLast Update
0000403Ecere SDKcompilerpublic2016-04-19 05:19
Reporterthexa4 Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status newResolutionopen 
Target Version0.46 eC II 
Summary0000403: Assigning Templated value to Array<T> doesn't work
Descriptionimport "ecere"

class Stack<class T>
{
  private:
    int pos;
  public:
    Array<T> array {};
    
    void Push(T obj)
    {
        array[pos++] = obj;
    }
    
    T Pop()
    {
        return array[--pos];
    }
    
    T Peek()
    {
        return array[pos - 1];
    }
    
    property int size {
        get{ return array.size; }
        set{ array.size = value; }
    }
}

gives "error: lvalue required as left operand of assignment" when compiling
Additional Informationworkaround:
use array.Add if you want to add it to the end of the array or array.array[i] = ...
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-04-17 22:37 thexa4 New Issue
2010-07-29 15:54 jerome Priority normal => high
2012-03-08 16:51 redj Target Version => 0.45 Ginkakuji
2012-03-29 07:50 redj Category => eC Compiling Tools
2012-03-29 07:50 redj Project @2@ => Ecere SDK
2014-07-11 18:53 jerome Target Version 0.45 Ginkakuji => 0.46.1
2016-04-19 05:19 jerome Target Version 0.46.1 => 0.46 eC II