[68783 Closed] Type mismatch in build after updating Elements

I’m getting the following trying to build a project:

Error    3    (E62) Type mismatch, cannot assign "<error>" to "String"        0    0    Nes.HGFeedbackParsing

I haven’t worked on it in a week or so, and during that time I updated to Elements 7.1.75.1557, using VS 2013 Pro on Update 2. Other projects (in different solutions) build without incident.

Additionaly, I’m seeing the following error and warning:

Error    1    (E406) No overloaded method "FeedbackId" with these parameters on type "FeedbackSupportMessage", best matching overload is "method <Write>FeedbackId(value: String)"    FeedbackSupportMessage.pas    493    5    Nes.HGFeedbackParsing

Warning    2    (H3) parameter 1 is "<error>" should be "String"    FeedbackSupportMessage.pas    493    5    Nes.HGFeedbackParsing

The line in question is:

FeedbackId := coalesce(tempValue, '');

with tempValue a String. FeedbackId is a String property on the class, reading and writing to a protected member of its base class. If I edit the line to just assign a literal string to FeedbackId, the warning and error about that line go away, but the original Type Mismatch that isn’t tied to any file or line sticks around.

I’ve tried cleaning the project/solution, removing all .suo and .user files, and manually wiping out the bin and obj dirs, just for grins. Is there something else I should try, or could this be a new compiler bug? My next step was to uninstall Elements and then load up the previous version.

Thanks!

I just tried this: and that works here. What am I missing?

unit issueasgftest;

interface



uses

  System.Linq, System.Collections.Generic;

type
  ConsoleApp = public class
 public
    class method Main(args: array of string): Integer;
   
   class property FeedbackID: String;
  end;

implementation

class method ConsoleApp.Main(args: array of string): Integer;
begin
var tempValue := '';
  FeedbackID := coalesce(tempValue, '');
end;

end.

Hard to say. The app’s complex enough that isolating that particular file to try and nail down the problem would take some serious work.

I tried commenting out every line of code in that file, save for the object declaration and the function implementation headers. Still got the type mismatch error, and it still didn’t map to any particular file or line. That plus the fact that the compiler thinks my coalesce() call is of type “<error>” is what lead me to believe it might be a problem in the new release.

I tried uninstalling Elements and loading up the previous version (7.1.75.1551), but I just ended up with a VS install where the Everwood welcome screen showed no products, and I can’t open any Oxygene Solutions/Projects. I’m now waiting on a repair of the VS install to complete, in case that helps.

If it’s an option for you, you can send your project to me directly (ck @ remobjects com), I’ll have a look and delete it afterwards.

Well on a hunch I moved back to the 1557 build and found that at least now my RO products showed up in VS. The installer included options like “.NET Support” and “Open .oxygene files with Visual Studio” that the 1551 one did not, so I suspect that issue was just a borked installer.

Still had the strange type mismatch error, so I set the Build Action for all the .pas files in the project to None, and it built fine (natch). Then I changed the setting back to Compile a file at a time until I got that error again. Found it with a different file this time - much simpler, but also uses coalesce().

I built both a Class Library and Command Line app much like the code you posted above, and both fail with the type mismatch error. I’ve attached the solution and project files.

Since I know it’s something to do with the coalesce function, I can pretty easily workaround it. But if you need me to send you more info or run some diagnostic to try and suss out just what’s going on, let me know.

Thanks again for the help.

CoalesceErrorTest.zip (46.5 KB)

Thanks, logged as bugs://68783: Type mismatch in build after updating Elements

Oke so the good news is that it’s already fixed in the latest builds (you ddin’t mention if you’re a trial user or not, but if not you can grab those from the Beta builds on https://secure.remobjects.com). Will the workaround do for you for now?

bugs://68783 got closed as fixed for release Andromeda Class

We’ve got beta access, but I only use coalesce() in a couple places, so can just workaround it for now. Glad to hear the issue’s already handled. Thanks!