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
resource type Logger
effect Update
def updateLog(msg: String): {this.Update} Unit
Run the text-editor application.
Expected behavior: Throws an error saying that the logger module doesn't match the Logger type because logger's method isn't annotated with the matching effect (i.e., logger's method should have the signature: def updateLog(msg: String): {Update} Unit).
Actual behavior: No error is thrown.
The text was updated successfully, but these errors were encountered:
It's not surprising that no error would be given because logger.wyv does not have effect annotations. Putting an annotation {} on the module definition should force an annotation on updateLog. According to my conversation with @Darya- this is not the case, so that is the first thing we should fix.
In the text-editor application, annotate the logger type and module in the following way:
logger.wyv:
Logger.wyt:
Run the text-editor application.
Expected behavior: Throws an error saying that the
logger
module doesn't match theLogger
type becauselogger
's method isn't annotated with the matching effect (i.e.,logger
's method should have the signature:def updateLog(msg: String): {Update} Unit
).Actual behavior: No error is thrown.
The text was updated successfully, but these errors were encountered: