-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When x is used in the contract field, the compiler emits an error.
PoC
Code:
import std;
contract PoC {
x : word;
}
Error:
tcExp not implemented for: this.x
FieldAccess Nothing x
- in:Typedef.rep(this.x)
- in:function toWord (x : ?$5999) -> word {
return Typedef.rep(this.x);
}
- in:?$5999 : Add, ?$5999 : Sub, ?$5999 : Bounded, ?$5999 : Eq, ?$5999 : Ord, ?$5999 : Typedef (word) => default instance ?$5999 : Num {
function maxVal () -> ?$5999 {
return Bounded.maxVal();
}
function toWord (x : ?$5999) -> word {
return Typedef.rep(this.x);
}
function fromWord (x : word) -> ?$5999 {
return Typedef.abs(this.x);
}
function add (x : ?$5999, y : ?$5999) -> ?$5999 {
return Add.add(this.x, y);
}
function sub (x : ?$5999, y : ?$5999) -> ?$5999 {
return Sub.sub(this.x, y);
}
function gt (x : ?$5999, y : ?$5999) -> bool {
return Ord.gt(this.x, y);
}
}
If x is renamed to x1, for example, the compilation succeeds.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels