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
@untrackedCaptures// allowed since we are not in safe mode
50
50
privatevalcached=HashMap[A, B]()
51
51
52
52
defapply(x: A) = cached.getOrElseUpdate(x, f(x))
@@ -63,7 +63,8 @@ object CheckedMailer {
63
63
64
64
defsendMail(email: Email) =
65
65
if userPrompt(s"OK to send email?\n\n$email") then
66
-
Mailer.send(email)
66
+
Mailer.send(email) // allowed even if Mailer is not @assumeSafe
67
+
// since we are not in safe mode
67
68
}
68
69
```
69
70
There's also the `@rejectSafe` annotation in `caps`, which can be seen to be a dual to `@assumeSafe`. It renders selected members of assumed safe components inaccessible in safe mode.
0 commit comments