Function with `<localizes>` has type error when adding the `return` keyword

Hi all, does anyone know why adding the return keyword in the below snippets would cause a type error? I was under the impression the return keyword is optional so this may be a bug?

# No type error
GetPlayerActionMessage<localizes>(PlayerName: string, Action: string): message =
    "{PlayerName} played {Action}"
# Type error - "Localized messages may only be initialized with a string literal."
GetPlayerActionMessage<localizes>(PlayerName: string, Action: string): message =
    return "{PlayerName} played {Action}"
3 Likes