src/ffi: document the differences between the light and full FFI
[nit.git] / src / ffi / extern_classes.nit
index 4e8f45d..c0e826b 100644 (file)
@@ -17,7 +17,8 @@
 # Manages all extern classes and their associated foreign type.
 module extern_classes
 
-import ffi_base
+import light_ffi_base
+import modelize
 
 redef class ToolContext
        var extern_classes_typing_phase_ast: Phase = new ExternClassesTypingPhaseAst(self, [ffi_language_assignation_phase, modelize_class_phase])
@@ -38,8 +39,8 @@ private class ExternClassesTypingPhaseAst
                if code_block == null then return
 
                if nclassdef.n_kwredef != null then
-                       # A redef cannot specifiy a different extern type
-                       toolcontext.error(nclassdef.location, "Only the introduction of a class can specify an extern type.")
+                       # A redef cannot specify a different extern type
+                       toolcontext.error(nclassdef.location, "FFI Error: only the introduction of a class can declare an extern type.")
                        return
                end
 
@@ -118,7 +119,7 @@ redef class MClass
                                        else
                                                # detect conflict
                                                if super_ftype != ftype_b then
-                                                       v.toolcontext.error(null, "Extern type conflict in {self}")
+                                                       v.toolcontext.error(null, "FFI Error: extern type conflict in `{self}`.")
                                                        return null
                                                end
                                        end