newbiettn / ambienttalk

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

Tagging of mirages does not work #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Evaluate the following script:

deftype T;
def o := object: { nil } taggedAs: [ T ] mirroredBy: { | base | extend: 
defaultMirror with: { nil } };
is: o taggedAs: T; 

What is the expected output? What do you see instead?
output should be true, but instead it is false. tagsOf: o also returns an empty 
table

Original issue reported on code.google.com by smost...@gmail.com on 20 Mar 2010 at 4:19

GoogleCodeExporter commented 9 years ago
The correct mechanism to initialize the mirage is as follows:

deftype T;
def o := object: { nil } taggedAs: [ T ] mirroredBy: { | base | extend: 
defaultMirror.new(base) with: { nil } };
is: o taggedAs: T; 

Original comment by smost...@gmail.com on 20 Mar 2010 at 5:02