In the text-editor application, annotate the logger type and module in the following way:
logger.wyv:
module def logger(logFile: fileSystem.File): Logger
effect Update = {system.FFI}
def updateLog(msg: String): Unit
val logAppender = logFile.makeAppender()
logAppender.write(msg)
logAppender.close()
Logger.wyt:
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.
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
loggermodule doesn't match theLoggertype 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.