class A { has Str $.x ; method test { say 'Test'; say $!x ; } } A.new(x =>'hello').test;