Added test to have better error message when var type or ref not specified