semantize: do not auto_super_init `new`-factories
authorJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 20:23:27 +0000 (15:23 -0500)
committerJean Privat <jean@pryen.org>
Tue, 4 Nov 2014 20:23:27 +0000 (15:23 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/semantize/auto_super_init.nit

index 31a508a..ac7763e 100644 (file)
@@ -65,7 +65,7 @@ redef class AMethPropdef
                var nosuper = get_single_annotation("nosuper", modelbuilder)
 
                # Collect only for constructors
-               if not mpropdef.mproperty.is_init then
+               if not mpropdef.mproperty.is_init or mpropdef.mproperty.is_new then
                        if nosuper != null then modelbuilder.error(nosuper, "Error: nosuper only in `init`")
                        return
                end