Closed p6rt closed 11 years ago
\
I made a patch that fixes this:
> "foo"."bar" Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. > "foo" . "bar" Unsupported use of . to concatenate strings; in Perl 6 please use ~
I'm wondering, if a testcase should be written to check for a helpful error message? Would this kind of thing go in t/spec somehow?
- [ || <.panic: "Quoted method name requires parenthesized arguments"> ] + [ || <.panic: "Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'."> ] ] <.unsp>? :dba('method arguments') [ @@ -3008,6 +3008,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD { token infix:sym{ >> } token infix:sym<~> { } + token infix:sym<.> { '.' <[\]\)\},:\s\$"']> <.obs('. to concatenate strings', '~')> } token infix:sym<&> { } token infix:sym<|> { } -- 1.7.10.4 ```
The RT System itself - Status changed from 'new' to 'open'
Thanks, I've applied your patch, with a small modification:
instead of
+ token infix:sym\<.> { '.' \<[\]\)\},:\s\$"']>
I've used \
I'm wondering, if a testcase should be written to check for a helpful error message? Would this kind of thing go in t/spec somehow?
I've added one to t/spec/S32-exceptions/misc.t that checks for X::Obsolete.
As for the other one, the proper way to test it is to change it to a typed exception, and check for the type.
Cheers, Moritz
@moritz - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#77856 (status was 'resolved')
Searchable as RT77856$