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

Bug 652 - array types in function return
Summary: array types in function return
Alias: None
Product: UPPAAL
Classification: Unclassified
Component: Engine (show other bugs)
Version: 4.1.19
Hardware: All All
: P5 enhancement
Assignee: Marius Mikučionis
Depends on:
Reported: 2018-05-02 13:13 CEST by Marius Mikučionis
Modified: 2018-05-02 13:15 CEST (History)
1 user (show)

See Also:

return array minimal example (1004 bytes, text/xml)
2018-05-02 13:15 CEST, Marius Mikučionis

Note You need to log in before you can comment on or make changes to this bug.
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