Merge: Cleanup auto_super_init
authorJean Privat <jean@pryen.org>
Wed, 9 Dec 2015 03:51:14 +0000 (22:51 -0500)
committerJean Privat <jean@pryen.org>
Wed, 9 Dec 2015 03:51:14 +0000 (22:51 -0500)
Constructors have a long history of attempted specifications, therefore a lot of complex cases and code was still present to avoid breaking thing.

Here, we simplify the code of `auto_super_init` that deal with injecting implicit call to various semantic of `super` in a constructor.

Now, there is only two remaining cases:

* the constructor is a redefinition, then a genuine call to `super` (polymorphic and linearized) injected
* the constructor is the introduction of a named constructor, then a call to the auto `init` is injected iff there is no conflict and no arguments.

Pull-Request: #1883
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

1  2 
lib/markdown/markdown.nit

@@@ -168,7 -168,6 +168,7 @@@ class MarkdownProcesso
                                var c = input[i]
                                if c == '\n' then
                                        eol = true
 +                              else if c == '\r' then
                                else if c == '\t' then
                                        var np = pos + (4 - (pos & 3))
                                        while pos < np do
@@@ -635,7 -634,7 +635,7 @@@ class LinkRe
  
        # Create a link with a title.
        init with_title(link: String, title: nullable String) do
-               self.link = link
+               init(link)
                self.title = title
        end
  end