[Only in 2.0.4] 'return x:=unset' will return a blank string Topic is solved

Report problems with documented functionality
User avatar
V2User
Posts: 195
Joined: 30 Apr 2021, 04:04

[Only in 2.0.4] 'return x:=unset' will return a blank string

Post by V2User » 19 Jul 2023, 06:50

@Lexicos
In the latest versioned last week, return x:=unset will no longer return unset nor throwing, but return a blank string instead. Is it bydesign?
Code:
f(){
return x:=unset
}
c:=f()
OutputDebug(IsSet(c)) ;It is "" and output 1. But it will output 0 in versions<=2.03 instead.

lexikos
Posts: 9679
Joined: 30 Sep 2013, 04:07
Contact:

Re: [Only in 2.0.4] 'return x:=unset' will return a blank string

Post by lexikos » 20 Jul 2023, 03:05

No, it is not intended.

Only someone who is trying to do things that are not allowed by the documentation would encounter this.

lexikos
Posts: 9679
Joined: 30 Sep 2013, 04:07
Contact:

Re: [Only in 2.0.4] 'return x:=unset' will return a blank string  Topic is solved

Post by lexikos » 15 Aug 2023, 16:43

Fixed by v2.1-alpha.2. f returns unset and c:=f() throws an error as intended.

Post Reply

Return to “Bug Reports”