Skip to content

Commit

Permalink
Wordwrap X::Import::Redeclaration message
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jul 5, 2020
1 parent 83a126b commit 3add861
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core.c/Exception.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,10 @@ my class X::Import::Redeclaration does X::Comp {
has @.symbols;
has $.source-package-name;
method message() {
@.symbols == 1
?? "Cannot import symbol @.symbols[0] from $.source-package-name, because it already exists in this lexical scope"
!! ("Cannot import the following symbols from $.source-package-name, because they already exist in this lexical scope: ", @.symbols.join(', '));
(@.symbols == 1
?? "Cannot import symbol '@.symbols[0]' from '$.source-package-name', because it already exists in this lexical scope."
!! "Cannot import the following symbols from '$.source-package-name', because they already exist in this lexical scope: { @.symbols.map( { "'$_'" } ).join(', ')}."
).naive-word-wrapper
}
}

Expand Down

0 comments on commit 3add861

Please sign in to comment.