namgk / ambienttalk

Automatically exported from code.google.com/p/ambienttalk
0 stars 0 forks source link

A bug on ReflectOnActor() ? #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.I wanted to try implicit reflection on actor as follows.

def actor := reflectOnActor();

actor.becomeMirroredBy: (extend: actor with: {
   def createMirror(obj){
       extend: super.createMirror(obj) with: {
        def addSlot(x){
        system.println("you cannot add.");      
    };
       }
   };
});

2. above code worked well,but when I typed "ReflectOnActor()" after this,
   interpreter freezed. Here is error log.

Exception in thread "Event Loop The Read-Eval-Print Loop"
java.lang.reflect.Unde
claredThrowableException
        at $Proxy0.toString(Unknown Source)
        at edu.vub.at.IAT.evalAndPrint(IAT.java:520)
        at edu.vub.at.IAT$ReadEvalPrintLoop.execute(IAT.java:137)
        at
edu.vub.at.actors.eventloops.EventLoop$EventProcessor.run(EventLoop.j
ava:269)
Caused by: edu.vub.at.exceptions.XIllegalOperation: Detected illegal
invocation 
of toString: sharing via Java level of object <obj:15293014{createMirror}>
        at edu.vub.at.objects.coercion.Coercer.invoke(Coercer.java:152)
        ... 4 more

What version of the product are you using? On what operating system?
at2dist080509, the newest one. I executed it in Linux(Ubuntu8.04)

I don't know it is a bug or feature but it looks like strange to me.

Thanks.

Original issue reported on code.google.com by roku.du...@gmail.com on 17 Jul 2009 at 5:13

GoogleCodeExporter commented 8 years ago
Thanks for filing this bug report. I was able to track down the cause. The 
issue has been fixed now (it was a bug 
in the read-eval-print loop).

Original comment by tvcut...@gmail.com on 27 Jul 2009 at 9:17