Merge: Filter isa adaptation
authorJean Privat <jean@pryen.org>
Mon, 27 Jun 2016 21:58:24 +0000 (17:58 -0400)
committerJean Privat <jean@pryen.org>
Mon, 27 Jun 2016 21:58:24 +0000 (17:58 -0400)
commit1371cdfc0edb4b0728779024eb54ff1a1d5aa896
treeb0a9821f8d4743b3ea7fc71575f698f2f8aed86c
parent0bd93de684a38b2fb3c2269e885726d9618f5d65
parentc4374787cdacaac99b2b78139d1489bcccd10383
Merge: Filter isa adaptation

`isa` used to always adapt a local variable, even if there was strict information loss (a warning was shown but the adaptation was effective).

This caused issues for the adaptive typing system since there was no way to retrieve the original type information.

~~~nit
var a: A
a = new B
# a is now a B
if a isa A then
   # warning, but a is now a A
else
  # nothing here, so a is still a B
end
# merge type information of both branches: a isa A or B, thus a isa A
~~~

The change is now that `a isa A` still cause a warning but not more do the adaptation.
Thus in the *then* branch, `a` is still a `B`.
Thus in the merge at the end of the `if`, `a` remains a `B`.

close #2202

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