Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[dotnet] add defined method to Mu
add substr Ops and substr method to a barebones Match class oh, and, the rest of the initial accessors implementation added 56-accessors.t - basic tests of accessors & (fluent) mutators
- Loading branch information
Showing
3 changed files
with
77 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # auto-generatored accessors & mutators | ||
| # but not lvalue as in Perl 6, just "fluent" mutator methods | ||
|
|
||
| plan(2); | ||
|
|
||
| class Foo3 { has $.bar is rw } | ||
|
|
||
| my $foo := Foo3.new(); | ||
|
|
||
| # doesn't work yet; no viviself for attributes :( | ||
| #ok(!$foo.bar()); | ||
|
|
||
| ok($foo.bar("baz") eq "baz"); | ||
|
|
||
| ok($foo.bar eq "baz"); |