Closed ghost closed 3 years ago
Not sure if this is related to ARC/ORC at all - might be overloading resolution instead?
From the spec:
Every arg in args needs to match. There are multiple different categories how an
argument can match. Let f
be the formal parameter's type and a
the type
of the argument.
f
is a generic type and a
matches, for
instance a
is int
and f
is a generic (constrained) parameter
type (like in [T]
or [T: int|char]
.a
is a range[T]
and T
matches f
exactly. Or: a
is a subtype of f
.These matching categories have a priority: An exact match is better than a literal match and that is better than a generic match etc.
The compiler is correct.
This code is expected to call the
dispose
method but it calls a template instead.Found in the 4th NiGui example. It crashes with ARC/ORC because Nim calls ARC's
dispose
from here instead of NiGui'sdispose
defined here (it's exported in the forward declaration at the top of the file).Example
Current Output
Expected Output