Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Summary
Verse does not support option overloading.
Steps to Reproduce
Func(: int): void = {}
Func(: string): void = {} # good overload
Func(: ?int): void = {} # error
Expected Result
Option overload should be permitted and compile just fine. Passing option { 42 }
should use the 3rd overload, where a simple 42
should use the first overload. It should also not be limited to concrete types but should equally apply to parametric types as well.
Bar(: t where t: type): void = {}
Bar(: ?t where t: type): void = {} # should be also fine
Observed Result
Compile time error: Func(:?int) in package is ambiguous with this definition.
Platform(s)
N/A