local g={}function g.new(g)local N={}local V={}N.__index=V if g then for g,N in pairs((getmetatable(g)).__index)do V[g]=N end end function N.__newindex(g,N,m)assert(V[N]==nil,string.format("\067\097\110\110\111\116 \114\101\097\115\115\105\103\110 \037\115 \105\110 \099\111\110\116\101\120\116",tostring(N)))V[N]=m end return setmetatable({},N)end return g

local Context = {}

function Context.new(parent)
	local meta = {}
	local index = {}
	meta.__index = index

	if parent then
		for key, value in pairs(getmetatable(parent).__index) do
			index[key] = value
		end
	end

	function meta.__newindex(_obj, key, value)
		assert(index[key] == nil, string.format("Cannot reassign %s in context", tostring(key)))
		index[key] = value
	end

	return setmetatable({}, meta)
end

return Context
