Prohibit weak-effect funcs calling strong-effects

This commit is contained in:
Nigel Tao committed 2018-12-26 11:43:15 +11:00
1 parent 7a0a345d41
commit ef51d032ba
2 files changed
+37 -14

No files matched your search

+2
View File
@@ -120,6 +120,8 @@ func (e Effect) Impure() bool { return e&EffectImpure != 0 }
func (e Effect) Optional() bool { return e&EffectOptional != 0 }
func (e Effect) Coroutine() bool { return e&EffectCoroutine != 0 }
func (e Effect) WeakerThan(o Effect) bool { return e < o }
func (e Effect) String() string {
switch e & effectMask {
case 0: