Fixed a small problem with the types of arrays of channel-ends in the C++ generation
This commit is contained in:
parent
6d5c01ac69
commit
18f23bf767
|
@ -1319,8 +1319,12 @@ cintroduceSpec (A.Specification _ n (A.IsExpr _ am t e))
|
|||
rhs
|
||||
tell [";\n"]
|
||||
cintroduceSpec (A.Specification _ n (A.IsChannelArray _ (A.Array _ c) cs))
|
||||
= do call genType c
|
||||
tell ["*"]
|
||||
= do call genType c
|
||||
case c of
|
||||
A.Chan _ _ -> tell ["*"]
|
||||
-- Channel ends don't need an extra indirection; in C++ they are not
|
||||
-- pointers, and in C they are already pointers
|
||||
_ -> return ()
|
||||
call genArrayStoreName n
|
||||
tell ["[]={"]
|
||||
seqComma (map (call genVariable) cs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user