You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately this fix won't address this problem. The reason is that we do two (at least) two rounds of constant folding: one before type checking and one after. The one before cannot use type information. And the error in this example is given before the type checking, since the information is needed by the type checker. So it's a phase ordering problem.
We can probably work around this by tracking enough information in the constant folding pass. I will think about it.
It's not that easy, tried for a while, but I will probably give up for now.
Without type knowledge it's not easy to do constant folding safely.
Feel free to file a separate issue about this last example; it won't work for now.
Hi,
We hit error when operating bit<X> variable casted from enum type.
Here is the detailed p4c compiler output.
The text was updated successfully, but these errors were encountered: