Bugzilla – Bug 317852
can't cast to certain types
Last modified: 2008-04-24 01:52:37 UTC
---- Reported by toshok@ximian.com 2005-05-02 05:32:32 MST ---- (mdb) print (object)ok Type System.Object is not a class type. (mdb) print (int)ok Type System.Int32 is not a class type. (mdb) print (string)ok Type System.String is not a class type. (mdb) print (Stream)ok Variable ok is not a class type. (mdb) quit Now, the error trying to cast to (int) might be correct, but "object" and "string" are definitely class/object types, and they should at least attempt to cast (and find that "ok" is not of a class type, like the cast to Stream does). ---- Additional Comments From toshok@ximian.com 2005-05-03 16:29:26 MST ---- There are also syntax errors when trying to cast to (type[]) or (type*). the grammar needs augmenting. ---- Additional Comments From toshok@ximian.com 2005-07-07 19:37:09 MST ---- The biggest problem with casts not working is the CastExpression's reliance on ITargetClassType/ITargetClassObject for the type/value in the expression. This of course won't work for languages without classes, and even in the mono backend case, some types aren't represented by MonoClassType (strings and fundamental types are all represented by other, non ITargetClassType types). ---- Additional Comments From martin@ximian.com 2005-07-19 16:41:42 MST ---- This one is next. ---- Additional Comments From miguel@ximian.com 2005-09-05 13:52:36 MST ---- reassigning to new debugger owner. Unknown operating system unknown. Setting to default OS "Other".
Should now be fixed.