|
@@ -709,7 +709,12 @@ let handle_type_parameter gen e e1 ef ~clean_ef ~overloads_cast_to_base f elist
|
|
with
|
|
with
|
|
| Unify_error el ->
|
|
| Unify_error el ->
|
|
(match el with
|
|
(match el with
|
|
- | [Cannot_unify (TAbstract(a,params), b)] ->
|
|
|
|
|
|
+ (*
|
|
|
|
+ Don't emit a warning for abstracts if underlying type is the same as the second type.
|
|
|
|
+ This situation is caused by `Normalize.filter_param` not "unpacking" abstracts.
|
|
|
|
+ *)
|
|
|
|
+ | [Cannot_unify (TAbstract(a,params), b)]
|
|
|
|
+ | [Cannot_unify (b, TAbstract(a,params))] ->
|
|
let a = apply_params a.a_params params a.a_this in
|
|
let a = apply_params a.a_params params a.a_this in
|
|
if not (shallow_eq a b) then
|
|
if not (shallow_eq a b) then
|
|
gen.gcon.warning ("This expression may be invalid") pos
|
|
gen.gcon.warning ("This expression may be invalid") pos
|