#include "WfAnalyzer.h"
namespace
{
namespace
{
namespace
{
using
namespace
collections
;
using
namespace
reflection
;
using
namespace
reflection
::
description
;
class
IsExpressionDependOnExpectedTypeVisitor
:
public
empty_visitor
::
,
public
empty_visitor
::
VirtualCseExpressionVisitor
{
public
:
*
;
bool
=
false
;
IsExpressionDependOnExpectedTypeVisitor
(
*
)
:manager(
)
{
}
void
(
*
)
override
{
->
(
this
);
}
void
(
*
)
override
{
->
((
::
*)
this
);
}
bool
(
<
>
)
{
=
false
;
(
this
);
return
;
}
void
(
*
)
override
{
auto
=
->
].
();
<
>
;
->
(
scope
,
->
.
,
testResults
);
if
(
testResults
.
() ==
0
)
{
=
true
;
}
}
void
(
WfOrderedLambdaExpression
*
)
override
{
auto
=
->
].
();
=
scope
->
.
() >
0
;
}
void
(
*
)
override
{
if
(
->
==
::
)
{
=
true
;
}
}
void
(
*
)
override
{
if
(
->
==
::
)
{
=
(
->
) &&
(
->
);
}
}
void
(
*
)
override
{
=
(
->
) &&
(
->
);
}
void
(
*
)
override
{
if
(
->
.
() ==
0
)
{
=
true
;
}
else
{
=
0
;
bool
=
false
;
auto
=
->
].
();
FOREACH(Ptr<WfConstructorArgument>, argument, node->arguments)
if
(
bool
=
true
)
for
(
const
::
vl
::
collections
::
<
<
>>&
= ::
vl
::
collections
::
(
->
);
__scope_variable_flag__
;
__scope_variable_flag__
=
false
)
for
(
<
>
;
__foreach_iterator__
.
(
argument
);)
{
if
(
argument
)
{
if
(
auto
=
argument
.
<
>())
{
possibleFieldCount
++;
<
>
;
->
(
scope
,
refExpr
.
,
testResults
);
if
(
testResults
.
() ==
0
)
{
unresolvableField
=
true
;
}
}
}
}
=
unresolvableField
&&
possibleFieldCount
==
->
.
();
}
}
void
(
WfExpectedTypeCastExpression
*
)
override
{
=
true
;
}
};
bool
IsExpressionDependOnExpectedType
(
*
,
<
>
)
{
IsExpressionDependOnExpectedTypeVisitor
(
);
(&
visitor
);
return
visitor
.
;
}
class
:
public
empty_visitor
::
,
public
empty_visitor
::
VirtualCseExpressionVisitor
{
public
:
;
void
(
*
)
override
{
->
(
this
);
}
void
(
*
)
override
{
->
((
::
*)
this
);
}
void
(
*
)
override
{
->
.
;
}
void
(
*
)
override
{
->
.
;
}
void
(
*
)
override
{
->
.
;
}
void
(
*
)
override
{
->
.
;
}
void
(
*
)
override
{
->
.
;
}
};
(
<
>
)
{
;
(&
visitor
);
return
visitor
.
;
}
}
}
}