Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tall style formatter hangs on this code snippet #1521

Open
renggli opened this issue Aug 12, 2024 · 1 comment
Open

Tall style formatter hangs on this code snippet #1521

renggli opened this issue Aug 12, 2024 · 1 comment

Comments

@renggli
Copy link

renggli commented Aug 12, 2024

The tall style formatter does not halt when trying to format this code snippet:

typedef Map1<T1, R> = R Function(T1 arg1);

typedef Map8<T1, T2, T3, T4, T5, T6, T7, T8, R> = R Function(
    T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);

extension Curry8<T1, T2, T3, T4, T5, T6, T7, T8, R>
    on Map8<T1, T2, T3, T4, T5, T6, T7, T8, R> {
  Map1<
          T1,
          Map1<T2,
              Map1<T3, Map1<T4, Map1<T5, Map1<T6, Map1<T7, Map1<T8, R>>>>>>>>
      get curry => (T1 arg1) => (T2 arg2) => (T3 arg3) => (T4 arg4) =>
          (T5 arg5) => (T6 arg6) => (T7 arg7) =>
              (T8 arg8) => this(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
}

The above snippet is quick minimal extraction that reproduces the problem I had formatting this code:
https://github.com/renggli/dart-more/blob/0a6238928da483da55273c61b9807f51946e79d4/lib/src/functional/types/curry.dart#L61-L72.

@munificent
Copy link
Member

Thanks, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants