Prohibit "this.etc = etc" inside pure functions

This commit is contained in:
Nigel Tao committed 2018-12-27 11:01:55 +11:00
1 parent d552f88738
commit 84f9d3a915
2 files changed
+23 -5

No files matched your search

-2
View File
@@ -53,8 +53,6 @@ pub func hasher.update!(x slice base.u8) base.u32 {
args.x = remaining
}
// TODO: check that you can't assign to this.foo unless the method's effect
// is "!" impure or "?" impure coroutine.
this.state = ((s2 & 0xFFFF) << 16) | (s1 & 0xFFFF)
return this.state
}