This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 652

Summary: array types in function return
Product: UPPAAL Reporter: Marius Mikučionis <marius>
Component: EngineAssignee: Marius Mikučionis <marius>
Status: ASSIGNED ---    
Severity: enhancement CC: adavid
Priority: P5    
Version: 4.1.19   
Hardware: All   
OS: All   
Architecture:
Attachments: return array minimal example

Description Marius Mikučionis 2018-05-02 13:13:44 CEST
Suppose we have the following declaration:

typedef struct { int x, y; } xy_t;

xy_t xy;

xy_t fn_xy(){
  xy_t res = {1, 2};
  return res;
}

const int N=3;
typedef int array_t[N];

array_t a;

array_t fn_a(){
  array_t res = { 1, 2, 3};
  return res;
}


The fn_xy works fine, but fn_a is not accepted, but it should.
Either this is not implemented, or the typechecker is too restrictive.
Comment 1 Marius Mikučionis 2018-05-02 13:15:48 CEST
Created attachment 325 [details]
return array minimal example