Color Constant as Default Parameter Value

SomeFunction(i As Integer, c As Color = &cFFFFFF)

SomeFunction(i As Integer, c As Color = Color.White)

The first works.

The second cause an error when you try and call this function. Unfortunately for me, I found the message obscure.
At the line where you call the function you get the message: This item does not exist.

Anyway, is there a simple logical reason why you cannot assign to a parameter a Color constant as a default value?

but you can as long as it IS a constant and not something masquerading as one (like a computed property)

what version of Xojo ?

Mac Desktop: Xojo 2019 R3.1

So is Color.White a “computed property” ?

Is Color.White a masquerade?

doesnt seem to be here
I’ve written you line of code in2019r1.1 and 2019r3.1 and it works as expected
I’m puzzled why you’d be having issues

[code]someFunction(theInteger As Integer, the Color As Color = Color.White) As Integer
Return theInteger * 2

Var atFirst As Integer = 2
Var twice As Integer

twice = someFunction(atFirst) // ----> ERROR: This item does not exist
[/code]


[code]someFunction(theInteger As Integer, the Color As Color = &cFFFFFF) As Integer
Return theInteger * 2

Var atFirst As Integer = 2
Var twice As Integer

twice = someFunction(atFirst) // ---->no problem[/code]

curious
file a bug report about this as it definitely seems wrong since it will accept the literal but not a constant

almost as if the lookup of the constant along a full path is failing or something