ACT does not accept user-defined type from wiki
fhuemer opened this issue · 2 comments
fhuemer commented
To Reproduce
Steps to reproduce the behavior:
- Use the ACT source included below.
- Run e.g.
act:read
ininteract
on the source file shown below - The following error message is produced:
interact> act:read mytype.act
ERROR: File `mytype.act', line 5, col 9
Assignments only permitted to `self' or `selfack' in HSE body
ACT source
I have a single source file containing just the user type type definition from the wiki
deftype mystruct <: int<16> (int<4> f1, f2; int<8> f3)
{
methods {
set {
f1:=self >> 12;
f2:=(self >> 8) & 0xf;
f3:=self & 0xff
}
get {
self:=(f1 << 12) | (f2 << 8) | f3
}
}
}
Computer setup (please complete the following information):
- Fedora Linux,
act
version4d94dec
(I compiled the version in actflow)
rmanohar commented
Thanks for catching this! This is a bug in the documentation (I just updated it). An earlier version of the language supported this particular feature, but it has since been removed from the language. (We found that it was quite confusing.)
fhuemer commented
Thank you for clarifying this!