File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,7 @@ class QAST::Compiler is HLL::Compiler {
788
788
while nqp ::istype($ cur_block , BlockInfo) {
789
789
my % sym := $ cur_block . qast. symbol($ name );
790
790
if % sym {
791
- $ scope := % sym <$ scope >;
791
+ $ scope := % sym <scope >;
792
792
$ cur_block := NQPMu;
793
793
}
794
794
else {
@@ -834,7 +834,17 @@ class QAST::Compiler is HLL::Compiler {
834
834
my $ type := type_to_register_type($ node . returns );
835
835
if $ type eq ' P' {
836
836
# Consider the blocks for a declared native type.
837
- # XXX TODO
837
+ my $ cur_block := $ * BLOCK ;
838
+ while nqp ::istype($ cur_block , BlockInfo) {
839
+ my % sym := $ cur_block . qast. symbol($ name );
840
+ if % sym {
841
+ $ type := type_to_register_type(% sym <type >);
842
+ $ cur_block := NQPMu;
843
+ }
844
+ else {
845
+ $ cur_block := $ cur_block . outer();
846
+ }
847
+ }
838
848
}
839
849
840
850
# Emit the lookup or bind.
You can’t perform that action at this time.
0 commit comments