问题
I'm trying to build xplain2sql using Gobo compiler and its tools. After issuing geant compile
command I get a lot of similar errors:
[CATCALL] class SQL_GENERATOR_TSQL65 (SQL_GENERATOR,2610,5): type 'STRING_8' of actual argument #1 does not conform to type 'UC_STRING' of formal argument in feature `is_equal' in class 'UC_STRING'
Above error refers to the last line of this code:
sql_infix_expression (a_left: XPLAIN_EXPRESSION; an_operator: STRING; a_right: XPLAIN_EXPRESSION): STRING
-- SQL expression for multiplication/division, etc.
require
valid_left: a_left /= Void
valid_right: a_right /= Void
operator_not_empty: an_operator /= Void and then not an_operator.is_empty
local
left_value,
right_value: STRING
do
if
an_operator.is_equal (once "+") and then
I don't know Eiffel, I just want to compile this code. There were other build errors which I was able to fix using some common sense and experience from other programming languages but I don't know how to deal with this.
回答1:
In this case, I think you could use same_string (..)
as replacement for is_equal (..)
.
回答2:
There is a option in the Gobo compiler that turns CAT-call errors into warnings, but it did not help me to complete the build successfully. However, the project compiles fine with EiffelStudio:
ec -config xplain2sql.ecf -c_compile -finalize
The resulting executable can be found in EIFGENs\xplain2sql\F_code
.
来源:https://stackoverflow.com/questions/47043406/string-8-does-not-conform-to-string-uc-in-is-equal