The precedence of the upcast operators :> and :?> in the language grammar is rather unexpected; the fix is to put parens around the upcast expression:

(!ctx :> IContext), ...

By on 7/6/2009 9:15 PM ()

Thanks for the response. Adding the parens did fix it.

I am still lost though as to how in the world missing parens can cause the compiler to loose the binding? In other words the next time I see the message how am I to guess that the problem is in the parens?

By on 7/7/2009 5:12 PM ()

I think that it must be parsing it in a way such that it swallows the previous 'let', e.g.

let a = blah

let b = blah

foo :> Type, b

parses as

let a = blah

(let b = blah

foo :> Type), b

but I haven't studied the language grammar carefully to verify it.

I would recommend always surrounding upcast expressions with parens.

By on 7/7/2009 5:50 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper