This commit is contained in:
parent
c3da960cbf
commit
5f647d029c
11
TestSuite/errors/err0395.pas
Normal file
11
TestSuite/errors/err0395.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type
|
||||
t1 = class
|
||||
|
||||
static procedure operator+=(a: t1; d: System.Action) := exit;
|
||||
|
||||
end;
|
||||
|
||||
begin
|
||||
var a := new t1;
|
||||
a *= ()->Writeln(1);
|
||||
end.
|
||||
8
TestSuite/errors/err0396.pas
Normal file
8
TestSuite/errors/err0396.pas
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
type TProc = procedure;
|
||||
|
||||
var i: integer;
|
||||
|
||||
begin
|
||||
var l := new List<integer>;
|
||||
l += ()->Inc(i);
|
||||
end.
|
||||
|
|
@ -275,7 +275,7 @@ namespace PascalABCCompiler.TreeConverter
|
|||
if (op != Operators.Undefined)
|
||||
{
|
||||
var sil = leftType.find_in_type(name_reflector.get_name(op));
|
||||
if (sil.Count > 0)
|
||||
if (sil != null && sil.Count > 0)
|
||||
{
|
||||
foreach (SymbolInfo si in sil)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue