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

crash with 0.11.3 when using generic variadics #333

Closed
matthargett opened this issue Jan 4, 2022 · 0 comments · Fixed by #334
Closed

crash with 0.11.3 when using generic variadics #333

matthargett opened this issue Jan 4, 2022 · 0 comments · Fixed by #334

Comments

@matthargett
Copy link

code:

local function mergeDeep<T...>(...: T...) -- : TupleToIntersection<...T>
	return mergeDeepArray({ ... })
end

crash:

thread '<unnamed>' panicked at 'unknown node GenericVariadic { name: TokenReference { leading_trivia: [], token: Token { start_position: Position { bytes: 36, line: 1, character: 37 }, end_position: Position { bytes: 37, line: 1, character: 38 }, token_type: Identifier { identifier: ShortString("T") } }, trailing_trivia: [] }, ellipse: TokenReference { leading_trivia: [], token: Token { start_position: Position { bytes: 37, line: 1, character: 38 }, end_position: Position { bytes: 40, line: 1, character: 41 }, token_type: Symbol { symbol: Ellipse } }, trailing_trivia: [] } }', src/formatters/luau.rs:340:18
stack backtrace:
   0: _rust_begin_unwind
   1: std::panicking::begin_panic_fmt
   2: stylua_lib::formatters::luau::format_type_info
   3: stylua_lib::formatters::luau::format_type_specifier
   4: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
   5: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::fold
   6: stylua_lib::formatters::functions::format_function_body
   7: stylua_lib::formatters::functions::format_local_function
   8: stylua_lib::formatters::stmt::format_stmt
   9: stylua_lib::formatters::block::format_block
  10: stylua_lib::formatters::CodeFormatter::format
  11: stylua_lib::format_code
  12: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant