Skip to content

Instantly share code, notes, and snippets.

@Tux
Created March 8, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tux/623592360badd619dacf to your computer and use it in GitHub Desktop.
Save Tux/623592360badd619dacf to your computer and use it in GitHub Desktop.
use v6;
class C {
has Str $.s is rw = "Default";
multi method new (Str $x) { $.s = $x; }
}
C.new.s.say;
C.new("foo").s.say;
=>
Default
Cannot look up attributes in a type object
in method s at src/gen/m-CORE.setting:3948
in method new at T.pl:7
in block <unit> at T.pl:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment