scope: refuse `&x` where x is a local variable
[nit.git] / tests / test_ffi_c_primitives.nit
index 48947b4..c3244c8 100644 (file)
@@ -28,7 +28,11 @@ fun multiply_by_100(v: Float): Float `{
        return v * 100;
 `}
 
-fun print_ns(s: NativeString) `{
+fun plus_0x10(v: Byte): Byte `{
+       return v + 0x10;
+`}
+
+fun print_ns(s: CString) `{
        printf("%s\n", s);
 `}
 
@@ -41,6 +45,6 @@ print plus_1000(1234)
 
 print multiply_by_100(123.45)
 
-print multiply_by_100( 123.45 )
+print plus_0x10(0x2u8)
 
 print_ns("hello world".to_cstring)