lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Erik Cassel skrev:
[...]
To make matters worse, the lazy pushclosure
approach leads to the following even more bizarre assertion failure:

	foo1 = newObj()
	assert( foo1.bar == foo1.bar, "huh????!!!!!!!!"  )


Just a small notice here without adding any more cents :)

If you cache the closure for the bar() method from the __index function in the object (or in a separate cache table with the object as key) you'll get by that assert.


//Andreas