Closed aam closed 7 years ago
@peter-ahe-google @sigmundch
@rmacnak-google
I wouldn't expect us to build a flow graph for a redirecting factory at all. Perhaps something neglected to follow the redirection.
https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/pesto_demo.dart#L75 is the redirecting constructor invocation, which is invoked from RecipeGridPage::createState
at https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/pesto_demo.dart#L71.
@jensjoha
Just remembered that let dynamic #redirecting_factory = fra2::LabeledGlobalKey::_ in invalid-expression;
is a valid way to represent redirecting factory constructors in Kernel and the question is why GlobalKey constructor was invoked as it was supposed to be redirected to invocation of LabeledGlobalKey constructor.
The issue seems to be with kernel file produced by incremental compilation. Instead of having invocation of target constructor(LabeledGlobalKey) produced in kernel file, it has invocation of redirecting constructor(GlobalKey):
full kernel file:
class _RecipeGridPageState extends fra::State<pes::RecipeGridPage> {
final field fra::GlobalKey<sca2::ScaffoldState> scaffoldKey = new fra::LabeledGlobalKey::_<sca2::ScaffoldState>();
default constructor •() → void
: super fra::State::•()
;
@core::override
incremental kernel file:
class _RecipeGridPageState extends fra::State<pes::RecipeGridPage> {
final field fra::GlobalKey<sca::ScaffoldState> scaffoldKey = fra::GlobalKey::•<sca::ScaffoldState>();
default constructor •() → void
: super fra::State::•()
;
@scheglov
Can this be closed?
Yes, all good now.
#redirecting_factory
declaration below seems to be invalid(invalid-expression
)generated from https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/framework.dart#L178
fails during hot reload in StreamingFlowGraphBuilder#BuildVariableDeclaration on
#redirecting_factory
.There seem to be no errors/warning produced for that Dart code