BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2019-08-04

class X::Signature::NameClash

Compilation error due to two named parameters with the same name

my class X::Signature::NameClash does X::Comp { }
Code

Compile time error thrown when two named parameters have the same name, potentially through aliases.

For example

sub f(:$a, :a(:@b)) { }
Code

dies with

===SORRY!===
Name a used for more than one named parameter
Code

Methods§

method name§

method name(--> Str:D)
Code

Returns the name that was used for more than one parameter.