Inference Methods: either I'm really not understanding something or this is a bug

In this simple language definition and its sandbox I have two Concept and one instance of each.

The instance of Thing1 is correctly identified as having a type error due to it's typeOf method using :==: to compare two different types.

The instance of Thing2 is incorrectly not identified as having a type error. It is making the same :==: comparison, but in an Inference Method in the class "Helpers".

Also, I couldn't even get the language to build without enclosing the Inference method's :==: in a construct of some sort (I used if(true)).

I'm trying to do a bit more complicated version of this in an actual Language I'm working on and finally realized I don't think I was doing anything wrong and narrowed it down to this. (49KB)
1 comment
Comment actions Permalink
Ahh it starts to make sense. The typeof() does more than just create a certain kind of node, the :==: things look for it specifically rather than dynamically checking the node in question. I'll write it that way.


Please sign in to leave a comment.