Fix GitHub issue #361 - explicit cast check on function return value.
A function call returning an enumeration value can be assigned to an
enumeration variable without an explict cast.
(cherry picked from commit bd0133b386)
This commit is contained in:
parent
fabdf42365
commit
e013745035
|
|
@ -2154,6 +2154,14 @@ ivl_variable_type_t NetEUFunc::expr_type() const
|
||||||
return IVL_VT_VOID;
|
return IVL_VT_VOID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const netenum_t* NetEUFunc::enumeration() const
|
||||||
|
{
|
||||||
|
if (result_sig_)
|
||||||
|
return result_sig_->enumeration();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
NetUTask::NetUTask(NetScope*def)
|
NetUTask::NetUTask(NetScope*def)
|
||||||
: task_(def)
|
: task_(def)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3714,6 +3714,7 @@ class NetEUFunc : public NetExpr {
|
||||||
const NetScope* func() const;
|
const NetScope* func() const;
|
||||||
|
|
||||||
virtual ivl_variable_type_t expr_type() const;
|
virtual ivl_variable_type_t expr_type() const;
|
||||||
|
virtual const netenum_t* enumeration() const;
|
||||||
virtual void dump(ostream&) const;
|
virtual void dump(ostream&) const;
|
||||||
|
|
||||||
virtual void expr_scan(struct expr_scan_t*) const;
|
virtual void expr_scan(struct expr_scan_t*) const;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue