This commit is contained in:
Бондарев Иван 2017-11-26 12:02:27 +01:00
parent 2e46be3190
commit 9bb01015cc
2 changed files with 19 additions and 1 deletions

View file

@ -264,7 +264,13 @@ namespace CodeCompletion
if (ps != null)
returned_scope = ps.return_type;
else
returned_scope = tleft;
{
if (_bin_expr.operation_type == Operators.Division)
returned_scope = TypeTable.real_type;
else
returned_scope = tleft;
}
cnst_val = tmp;
}
else if (tleft != null)

View file

@ -0,0 +1,12 @@
begin
var w: word;
var a{var a: real;} := w / 2;
var a2{var a2: integer;} := w div 2;
var b: byte;
var a3{var a3: real;} := b / 2;
var a4{var a4: integer;} := b div 2;
var a5{var a5: integer;} := w * 2;
writeln(a.GetType);
writeln(a2.GetType);
writeln(a5.GetType);
end.