Recent

Author Topic: declaring operator inc crashed the compiler  (Read 6117 times)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: declaring operator inc crashed the compiler
« Reply #15 on: April 10, 2019, 09:18:56 am »
By the way, in Delphi Round and Trunc also operators.
:o

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: declaring operator inc crashed the compiler
« Reply #16 on: April 10, 2019, 02:54:55 pm »
By the way, in Delphi Round and Trunc also operators.
:o
Shell I open a bug report?  O:-)

munair

  • Hero Member
  • *****
  • Posts: 798
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: declaring operator inc crashed the compiler
« Reply #17 on: April 10, 2019, 06:18:51 pm »
keep it simple

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: declaring operator inc crashed the compiler
« Reply #18 on: April 18, 2019, 07:44:45 am »
Sven has fixed the crash. Note that inc/dec are unary operators and take just one! parameter.
You can overload the procedures, though, if needed.
To sum up operator inc(var value:integer; increment:integer =1); is now forbidden.(and doesn't crash, but throws an error)
procedure inc/dec overloads are legal.

Michael has also  updated the documentation, as mentioned previously.
« Last Edit: April 18, 2019, 07:49:50 am by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018