Yep, looks like a bug.

I tried it in VS 2010 (Beta 1), and got the same result.

By on 10/25/2009 9:53 PM ()

Adding the semicolons indicates that this code should be treated as two seperate "interactions" sent to the F# Interactive. For the most part, it does not matter whether code is sent as seperate interactions, or sent as one long interaction. However for extension members, it does matter - extension members sent as part of the same interaction where a type is defined are treated as part of the type. When sent as a seprate interaction, they are treated as true extension members.

In this particular case, this is combining with the fact that extension members are not used in finding operator overloads. That is - you cannot implement an operator overload for a type using an "extension operator". So when sent as seperate interactions, or as a single interaction with the ;; inserted, this code should fail because the operator is not defined on the type itself.

By on 10/26/2009 11:03 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