Skip to content

Commit b9f90b7

Browse files
committed
add example of invalid call to public method
1 parent cf907b9 commit b9f90b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ppcs/ppc0033-ampersand-method-calls.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ package Foo {
9999
my $foo = Foo->new;
100100
$foo->public;
101101

102-
# this is an error, as there is no sub named private in scope
102+
# this is an error, as there is no sub named "private" in scope
103103
$foo->&private;
104+
105+
# this is also an error, as "public" does not exist in the current scope
106+
$foo->&public;
104107
```
105108

106109
## Prototype Implementation

0 commit comments

Comments
 (0)