From 1ed38fe126dafb62f5fea8ba98311f7a7dd4f386 Mon Sep 17 00:00:00 2001 From: jhugues Date: Wed, 20 Jun 2012 19:37:29 +0000 Subject: [PATCH] * sin, cos and similar functions take real as parameters, not integer .. git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@4836 129961e7-ef38-4bb5-a8f7-c9a525a55882 --- src/core/model/ocarina-analyzer-real.adb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/model/ocarina-analyzer-real.adb b/src/core/model/ocarina-analyzer-real.adb index bbad39aa..cbfae69e 100644 --- a/src/core/model/ocarina-analyzer-real.adb +++ b/src/core/model/ocarina-analyzer-real.adb @@ -2516,9 +2516,9 @@ package body Ocarina.Analyzer.REAL is if not Success then return; end if; - if Returned_Type (N) = RT_Integer then + if Returned_Type (N) = Rt_Float then null; - elsif Returned_Type (N) = RT_Int_List then + elsif Returned_Type (N) = Rt_Float_List then if Iter = 0 then Is_List := True; else @@ -2555,9 +2555,9 @@ package body Ocarina.Analyzer.REAL is Replace_Node_To_List (Parameters (S), N, P); Analyze_Verification_Expression (P, Success); if Success then - if Returned_Type (P) = RT_Integer then + if Returned_Type (P) = RT_Float then Success := not Is_List; - elsif Returned_Type (P) = RT_Int_List then + elsif Returned_Type (P) = RT_Float_List then Is_List := True; else Success := False; @@ -2575,7 +2575,8 @@ package body Ocarina.Analyzer.REAL is end loop; if not Success - or else (Iter >= 1 and then Is_List) then + or else (Iter >= 1 and then Is_List) + then Display_Analyzer_Error (No_Node, "expected a float as parameter", -- GitLab