Case issues across platforms

Hi, (2.0 MB)

I started off with a Island console app with the following

  var response := Http.ExecuteRequestSynchronous(new HttpRequest(Url.UrlWithString(''),HttpRequestMode.Get));

I then created a cocoa console app and pasted the same code in the main.

When compiling one of the suggestions was to change the case so I ended up with

  var content := Http.ExecuteRequestSynchronous(new HttpRequest(URL.URLWithString(''),HttpRequestMode.Get));

Shouldnt they both be using Url ?


Curious. Elements RTL2 has only

class method UrlWithString(aUrlString: not nullable String): not nullable Url;

so i’m not sure where the other comes from. But also note that the class is called Url`. It seems like you might have different “URL” class in scope from somewhere else — could I see complete test case that shows this?

FWIW, your testcase (which I overlooked first) complies clean here with only two expected warnings; no case mismatch and no auto-fix.

2 Messages
CocoaHttpConsoleApplication: Program.pas, line 12 — (H11) Local variable “content” is assigned to but never read
HttpConsoleApplication: Program.pas, line 9 — (H11) Local variable “response” is assigned to but never read

I checked with goto defintion and I was using Foundation.URL. That also has the same method

That’d explain it. make sure you count have Foundation in the uses after Elements.RTL. This will not be the only conflict, otherwise. Odd that your test case didn’t have that though? Do you see the happening with the exact project you sent?

What I sent you was after I built so it was already applied.

No, what you sent had it lowercase and no warning.

First screenshot, do a build and then i get the second screenshot

Ah yes never mind, I misread and thought the Island one did then case warning. The Toffee one was uppercased, yes.