Hopefully someone has some clue as to why Dynamics is spitting the dummy here.
I have a method called writeQuoteTable declared under classDeclaration in a Form. It compiles fine with no errors.
I also have a closeOk method underneath it. It currently looks like this:
public void closeOk()
{
element.writeQuoteTable();
super();
}
But it won't compile. element.writeQuoteTable(); gets the red squiggly line under it and the Compiler output says
"The class FormRun does not contain this function"
Yet if I type "element." then as soon as I type the "." I see the method appearing in the list

But if I select it and add a "();" at the end then "The class FormRun does not contain this function"
as you can see in the picture I've also added this code
test = Global::formHasMethod(element,'writeQuoteTable');
and I put a breakpoint in the method and checked the value of test and its True so I just don't get what's going on here. The method exists.
I created a new form and wrote two methods and had one call the other just fine so I don't think its syntax error
I commented out all of the code inside writeQuoteTable to see if it was something inside it that broke it somehow. Same issue.
I created a new form and started setting it up just like my broken form but after only adding in about half of the design elements I had the same problem reoccur.
I recompiled the entire code last night before I left for home as once before when I had something kind of unexplainable, that fixed it. I had high hopes for it this time but alas... no.
I guess I'm going to duplicate the broken form and just start deleting design components until it works again to try and work out what's causing it, but if someone has seen this sort of thing before I'd love some other suggestions.