julia> using Compat
julia> @compat f(; x) = x
f (generic function with 1 method)
julia> f()
ERROR: UndefKeywordError: keyword argument x not assigned
Stacktrace:
[1] f() at ./REPL[3]:1
julia> @compat g(; x::AbstractString) = x
ERROR: syntax: invalid keyword argument syntax "x::AbstractString" (expected assignment)
On Julia 0.6.4 with Compat 1.4.0
Required keyword support added in: https://github.com/JuliaLang/Compat.jl/pull/586