two asserts on variable referencing an anonymous function as readonly