test variable scope for class inheritance