Context: https://dart-review.googlesource.com/c/sdk/+/464740
When expression is evaluated inside an extension/extension type member, CFE creates a non-static expression evaluation function without a class (in a library scope). This looks like an incorrect AST. Also, it is not clear what happens with type parameters which are passed separately.
Expression evaluation function should be at least marked static. Also, it should receive its "class" type parameters as function type arguments. This can be probably achieved by applying the same desugaring which is applied to instance members of extensions and extension types.
@johnniwinther @jensjoha @sstrickl