fix double function scope definition issue
check type when an expression of type is specified
fix instantiate_function_from_template()

- remove unused argument
- make more general using template
add is_builtin property in symbols

because compiler must know that the symbol is provided as builtin symbol.