bug fix #750
This commit is contained in:
parent
25d2217b13
commit
9489fd596e
6
TestSuite/question5.pas
Normal file
6
TestSuite/question5.pas
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
function f1 := 1;
|
||||||
|
function f2 := 0;
|
||||||
|
begin
|
||||||
|
var i := true ? f1 : f2;
|
||||||
|
assert(i = 1);
|
||||||
|
end.
|
||||||
|
|
@ -16777,7 +16777,8 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
condition = convertion_data_and_alghoritms.convert_type(condition, SystemLibrary.SystemLibrary.bool_type);
|
condition = convertion_data_and_alghoritms.convert_type(condition, SystemLibrary.SystemLibrary.bool_type);
|
||||||
expression_node left = convert_strong(node.ret_if_true);
|
expression_node left = convert_strong(node.ret_if_true);
|
||||||
expression_node right = convert_strong(node.ret_if_false);
|
expression_node right = convert_strong(node.ret_if_false);
|
||||||
|
try_convert_typed_expression_to_function_call(ref left);
|
||||||
|
try_convert_typed_expression_to_function_call(ref right);
|
||||||
/*var typeComparisonResult = type_table.compare_types(left.type, right.type);
|
/*var typeComparisonResult = type_table.compare_types(left.type, right.type);
|
||||||
if (typeComparisonResult == type_compare.greater_type)
|
if (typeComparisonResult == type_compare.greater_type)
|
||||||
right = convertion_data_and_alghoritms.convert_type(right, left.type);
|
right = convertion_data_and_alghoritms.convert_type(right, left.type);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue