Replies: 1 comment
|
Yeah, the only thing missing is supporting the unspecialized type. Your hack doesn't actually fix the problem because further uses of that variable will not be checked for correctness -- for example, I think this will let you call any method with any name on such a variable. Also of course it will cause issues for user declared classes of the same name. Anyway, the right way to fix this is to create a new type that is equivalent to any singular type (see in the spec that the class methods can accept objects of any type as long as they are singular) and then set that as the default value for the generic parameter in mailbox. So step 1 is to create the type and set up all the plumbing for it; you can look at all of the uses of a simple type like the UntypedType to see which parts are necessary. Then step 2 would be to make it possible to set a default value for a generic type parameter when creating a class programmatically (see StdPackage.cpp) -- I don't think it's easily doable at the moment. |
Uh oh!
There was an error while loading. Please reload this page.
I started looking into the mailbox implementation since it is not marked as complete. Besides supporting un-specialized mailboxes (no parameter definition), are there any other known features missing?
I made a small hack which allows the mailbox tests from the sv-tests repo to pass, but I doubt this is the best way to handle it.
All reactions