Boo syntax error in MonoDevelop, but not in Unity

I am trying to pass information to a prefab in a Boo script from a “Centeral Controller” script to a script “SlideControl.boo” running on a prefab. This:

public slideControl as SlideControl
def Start():

   slide = Instantiate(slideControl, Vector3(position_x,0,position_z), Quaternion.identity)
   slide.pageNumber = 1

The “pageNumber” part is not recognized by MonoDevelop, it says that Unity.Object does not contain pageNumber. But the Unity editor does not complain and seems to run fine. How can I let MonoDevelop know that it is a script reference, not an Object? I’ve tried using “slide.pageNumber as SlideControl = 1”, but that didn’t work either.

So, I figured out how to solve the issue, but not why MonoDevelop complains and Unity is OK with everything. This seems to happen in Boo. What you have to do is add “as SlideControl” at the end of an assign on a new variable, like this:

slide = Instantiate(slideControl, Vector3(position_x,0,position_z), Quaternion.identity) as SlideControl

That gives the slide a type that Mono can use since Boo isn’t really Python, it needs types for compilation, unlike Python.