From 0b36afb6459cb4e451a8fb592172eee260fffa8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 19 Feb 2013 16:11:02 +0100
Subject: [PATCH] Compiler: Improved diagnostics for invalid soft casts.

---
 src/las.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/las.c b/src/las.c
index 6e01e9ef21..40e3ba53d4 100644
--- a/src/las.c
+++ b/src/las.c
@@ -1346,8 +1346,8 @@ node *debug_mksoftcastnode(struct pike_type *type, node *n)
 	ref_push_type_value(n->type);
 	ref_push_type_value(type);
 	yytype_report(REPORT_ERROR,
-		      NULL, 0, NULL,
-		      NULL, 0, NULL,
+		      NULL, 0, type,
+		      NULL, 0, n->type,
 		      2, "Soft cast of %O to %O isn't a valid cast.");
       } else if (result_type == n->type) {
 	ref_push_type_value(n->type);
-- 
GitLab