dartMisparsedCtorIn (dart.ts) — whether the relational expression `rel` holds part of a misparsed generic constructor call before its `>`, where `node` is: its import prefix and a prefixed type argument read no member, and the call's types are referenced by the body walker.
(&self, rel: Node<'t>, node: Node<'t>)
| 1846 | /// where `node` is: its import prefix and a prefixed type argument read no |
| 1847 | /// member, and the call's types are referenced by the body walker. |
| 1848 | fn misparsed_ctor_in(&self, rel: Node<'t>, node: Node<'t>) -> bool { |
| 1849 | if let Some(own) = self.misparsed_ctor(rel) { |
| 1850 | return node.end_byte() <= own.gt.start_byte(); |
| 1851 | } |
| 1852 | // The `X < T` of `(X < T) > .name(…)`, or the `X < A` a split call |
| 1853 | // starts with: laid out as one before looking up from it |
| 1854 | // (`a.length < b.length` is not). |
| 1855 | let Some(lt) = self.ctor_type_args_start(rel) else { return false }; |
| 1856 | if self.ctor_callee(rel, lt).is_none() { |
| 1857 | return false; |
| 1858 | } |
| 1859 | match self.type_arg_part(lt.next_named_sibling()) { |
| 1860 | Some((_, None)) => {} |
| 1861 | _ => return false, |
| 1862 | } |
| 1863 | if let Some(outer) = rel.parent().filter(|o| o.kind() == "relational_expression") { |
| 1864 | if outer.named_child(0) == Some(rel) { |
| 1865 | return self.misparsed_ctor(outer).map(|c| c.start == rel).unwrap_or(false); |
| 1866 | } |
| 1867 | } |
| 1868 | self.next_listed_ctor(rel).is_some() |
| 1869 | } |
| 1870 | |
| 1871 | /// dartNextListedCtor (dart.ts) — the split constructor call that `start` |
| 1872 | /// begins (`X < A`), from the next item of its list. |
no test coverage detected