STRING_8 does not conform to STRING_UC in is_equal

▼魔方 西西 提交于 2019-12-11 15:59:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!