From 76c451e6fb2e5d6b377d79a85e807bb238803bc1 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Mon, 6 Jan 2014 21:10:29 +0100 Subject: Delete test.cpp --- src/test.cpp | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/test.cpp diff --git a/src/test.cpp b/src/test.cpp deleted file mode 100644 index 81373c8..0000000 --- a/src/test.cpp +++ /dev/null @@ -1 +0,0 @@ -int m() { return 1==2 && 3==4 || !(5>=6); } -- cgit v1.2.3 From f6b4cc449e4531b61d20f9c5544db4a8bedb7d1c Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Tue, 7 Jan 2014 14:57:25 +0100 Subject: Reject casts from **A to **B, even if B is a superclass of A. --- src/typing.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/typing.ml b/src/typing.ml index c5a44e3..c76c042 100644 --- a/src/typing.ml +++ b/src/typing.ml @@ -177,6 +177,7 @@ let rec subtype env a b = match a, b with | T_Int, T_Int -> true | T_Void, T_Void -> true | Typenull, TPoint(_) -> true + | TPoint(TPoint(TClass(_))), TPoint(TPoint(_)) -> false | TPoint(ka), TPoint(kb) -> subtype env ka kb | TClass(i), TClass(j) -> let c = get_c env i in -- cgit v1.2.3