bug fix #574
This commit is contained in:
parent
2e46be3190
commit
9bb01015cc
|
|
@ -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)
|
||||
|
|
|
|||
12
TestSuite/intellisense_tests/typededuction1.pas
Normal file
12
TestSuite/intellisense_tests/typededuction1.pas
Normal 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.
|
||||
Loading…
Reference in a new issue