Closed ab5tract closed 8 years ago
More golf-like and useful, I hope:
https://gist.github.com/ab5tract/414e6b6cda21d7f167e27b322932fd14
Contents of the golf, for easier access:
use v6;
use OO::Monitors;
monitor Grid {
has @!grid;
submethod BUILD() {
@!grid = [23, 42];
}
}
my $g = Grid.new;
dd $g;
The error is:
Invocant requires an instance of type Lock, but a type object was passed. Did you forget a .new?
and other variations on the theme, including:
Cannot invoke this object (REPR: Null; VMNull)
Fixed BUILD
and new
methods in monitors and added tests.
As reported in this gist: https://gist.github.com/ab5tract/4c2b8cc439d8470cbfda
I will post back a golf, if I find one.