phase/serialization: detect unsupported case until it is supported
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 20 Feb 2014 18:02:09 +0000 (13:02 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 22 Feb 2014 13:17:42 +0000 (08:17 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/serialization_phase.nit

index 7bdd2d4..c06a74d 100644 (file)
@@ -93,6 +93,10 @@ private class SerializationPhase
                code.add "      v.notify_of_creation self"
 
                for attribute in npropdefs do if attribute isa AAttrPropdef then
+                       if attribute.n_type == null then
+                               toolcontext.error(attribute.location, "NOT YET IMPLEMENTED: all attributes of an auto_serialized class definition must define a type.")
+                               continue
+                       end
                        var name = attribute.name
                        var type_name = attribute.type_name
                        code.add ""