v2 / vlib / v / checker / tests / compile_error_call_position.vv
11 lines · 9 sloc · 129 bytes · adcd421456d50a26e50f1caef933caf539c3b8e5
Raw
1module main
2
3fn son[T](val T) {
4 $if T !is int {
5 $compile_error('son only taken int as input')
6 }
7}
8
9fn main() {
10 son(false)
11}
12