return with clazz.new() fail #7

Open
Eclesia opened this Issue Aug 27, 2011 · 3 comments

Projects

None yet

3 participants

@Eclesia

Error can be reproduce like this :

class Foo
{
function initvtable
{
say("Foo init");
}
function hello()
{
say(FUNCTION);
}
}

function newInstance(var clazz){
return clazz.new();
}

function main(){
var clazz = class Foo;
var f = newInstance(clazz);
f.hello();
}

@NotFound
Owner

I think this is a parrot fault, but I'm not sure where it lies.

@NotFound
Owner

I've opened a parrot ticket, TT #2193

@Benabik

Ticket can now be found at parrot/parrot#596

And here's the original code with indenting:

class Foo {
    function init[vtable] {
        say("Foo init");
    }
    function hello() {
        say(FUNCTION);
    }
}

function newInstance(var clazz) {
    return clazz.new();
}

function main() {
    var clazz = class Foo;
    var f = newInstance(clazz);
    f.hello();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment