[perl #60648] :immediate-declared Classes Not Thawed from PBC

[email protected] (chromatic)
Newsgroups perl.perl6.internals
Message-ID <[email protected]>
# New Ticket Created by  chromatic 
# Please include the string:  [perl #60648]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60648 >


Given this PIR:

	.sub 'foo' :anon :immediate
	    $P0 = newclass 'Bar'
	.end

	.sub 'main' :main
	    $P0 = new 'Bar'
	    $P0.'hi'()
	.end

	.namespace [ 'Bar' ]

	.sub 'hi' :method
	    say "Hi!"
	.end

... the result is:

	Hi!

Now compile it to PBC:

	$ ./parrot -o no_thaw.pbc no_thaw.pir
	$ ./parrot no_thaw.pbc

	Class 'Bar' not found
	current instr.: 'main' pc 6 (no_thaw.pir:6)

See t/compilers/imcc/syn/hll.t #2 for a failing test.

-- c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.