diff options
| author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2015-03-25 23:25:52 +0000 |
|---|---|---|
| committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 2015-03-25 23:25:52 +0000 |
| commit | 0696023428bf26cf6ce0d0feb5dbf4bd790a57da (patch) | |
| tree | d009e873d2df234bedc50d9842a36cebea20c7e2 /testsuite | |
| parent | 0e4486084a857268573cfab9d4e208f6c829b454 (diff) | |
| download | ocaml-0696023428bf26cf6ce0d0feb5dbf4bd790a57da.tar.gz | |
Fix PR#5545, cleaner use of generalize_spine
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/tests/typing-objects/Tests.ml.reference | 7 | ||||
| -rw-r--r-- | testsuite/tests/typing-poly/poly.ml.principal.reference | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/testsuite/tests/typing-objects/Tests.ml.reference b/testsuite/tests/typing-objects/Tests.ml.reference index ed4df922d4..e5d9bb8d59 100644 --- a/testsuite/tests/typing-objects/Tests.ml.reference +++ b/testsuite/tests/typing-objects/Tests.ml.reference @@ -2,8 +2,8 @@ # - : < x : int > -> < x : int > -> < x : int > -> < x : int > * < x : int > * < x : int > = <fun> -# class ['a] c : unit -> object constraint 'a = int method f : 'a c end -and ['a] d : unit -> object constraint 'a = int method f : 'a c end +# class ['a] c : unit -> object constraint 'a = int method f : int c end +and ['a] d : unit -> object constraint 'a = int method f : int c end # Characters 238-275: ........d () = object inherit ['a] c () @@ -285,7 +285,8 @@ Error: This expression has type 'a t but an expression was expected of type Warning 10: this expression should have type unit. - : ('a t as 'a) t -> unit = <fun> # class ['a] c : - unit -> object constraint 'a = (< .. > as 'b) -> unit method m : 'a end + unit -> + object constraint 'a = (< .. > as 'b) -> unit method m : 'b -> unit end # class ['a] c : unit -> object constraint 'a = unit -> (< .. > as 'b) method m : 'a -> 'b end diff --git a/testsuite/tests/typing-poly/poly.ml.principal.reference b/testsuite/tests/typing-poly/poly.ml.principal.reference index 9370299793..09d753ac11 100644 --- a/testsuite/tests/typing-poly/poly.ml.principal.reference +++ b/testsuite/tests/typing-poly/poly.ml.principal.reference @@ -74,7 +74,11 @@ method empty : bool method fold : f:('a -> 'c -> 'c) -> init:'c -> 'c end -# class ['a] ostream1 : +# Characters 166-178: + self#tl#fold ~f ~init:(f self#hd init) + ^^^^^^^^^^^^ +Warning 18: this use of a polymorphic method is not principal. +class ['a] ostream1 : hd:'a -> tl:'b -> object ('b) |
