-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The generator fail on maps where the value is a message #62
Comments
@kevmal This looks familiar to that one you fixed in Enum a while back, can you remember what was causing it? A cast from object or something like that? |
Think Ive found it... |
Seems like two issues here. First problem is that falanx/Falanx.Machinery/QuotationToAst.fs Lines 143 to 152 in eb83880
Second issue is with the referenced version of fantomas, this fails Fantomas.CodeFormatter.FormatDocument("bleh.fsx", "let a = 1 :> obj",Fantomas.FormatConfig.FormatConfig.Default) with Luckily it seems like testing with fantomas master this may be fixed. |
I dropped all the box operations and coercions to obj and it seems to work, not got to upgrading Fantomas yet... |
So we also need to fix |
@kevmal So on a ProvidedType instance maybe |
Seems like let isAssignableFrom (ty: Type) (otherTy: Type) =
eqTypes ty otherTy || (match otherTy.BaseType with null -> false | bt -> ty.IsAssignableFrom(bt)) |
Fixed by #73 |
To Reproduce
Steps to reproduce the behavior:
Unable to cast object of type 'Downcast' to type 'InferredUpcast'.
error.Additional context
Tested on master
The text was updated successfully, but these errors were encountered: