Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2020-03

fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

10 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

fredvs

Hello.

I did try last fpc trunk and get that error message when compiling a program (mseide):

---> Error: Operator is not overloaded: "Class Of TBlobField" and "Boolean"

This comes from that line:

---> if fld1 is tblobfield then // here error.

Do you know what is the new equivalent for:
"if aclass is tblobfield" // boolean no more permitted

?

Thanks.

Fre;D

PS: I have a big stock of Aspirina.

-----
Many thanks ;-)

Michael Van Canneyt
to fredvs
fredvs wrote 15 lines
Hello. I did try last fpc trunk and get that error message when compiling a program (mseide): ---> Error: Operator is not overloaded: "Class Of TBlobField" and "Boolean" This comes from that line: ---> if fld1 is tblobfield then // here error. Do you know what is the new equivalent for: "if aclass is tblobfield" // boolean no more permitted ?

This is a bug, it should be permitted.

Michael.

fredvs
to Florian Klaempfl
You wrote before the code is: if fld1 is tblobfield then ?

Yes, it was to isolate the problem.

The original line that generates error is:

---> if fld1 is tblobfield and (self.fblobintf  nil) then begin

As work-around, removing "fld1 is tblobfield" makes trunk happy:

---> if self.fblobintf  nil then begin

To resume, the problem comes from "if fld1 is tblobfield".

-----
Many thanks ;-)

Bart
to fredvs
PM fredvs wrote
To resume, the problem comes from "if fld1 is tblobfield".

No, you miss the point:

if fld1 is tblobfield and (self.fblobintf nil) then begin

This will not compile anymore since the operator precedence of IS has been altered (to conform to docs and Delphi)
So it is now parsed as:

  if fld1 is (tblobfield and (self.fblobintf  nil)) then begin
Use: if (fld1 is tblobfield) and (self.fblobintf  nil) then begin

Bart

Bart
fredvs
to Bart

@Bart.

I just did try what you proposed (I promise without to read you before) and come here to announce that if solves the thing.

--> if (fld1 is tblobfield) and (self.fblobintf  nil) then begin

makes fpc trunk happy!

Well seen Florian, Bart and Micha.

;-)

Now, only msestat-files remain the problem with fpc rev 42375, but sure, the solution is near.

Happy sunday.

Fre;D

-----
Many thanks ;-)