Ticket #130 (accepted defect)
The compiler doesn't find the "closest" extension method
Reported by: | Chuck | Owned by: | jonathandavid |
---|---|---|---|
Priority: | major | Milestone: | Cobra 0.9 |
Component: | Cobra Compiler | Version: | 0.8.0 |
Keywords: | Cc: |
Description
Test case:
# x-extend.cobra class A pass class B inherits A pass class C inherits B pass extend B def n as int return 2 extend C def n as int return 3 class P def main is shared b = B() assert b.n == 2 c = C() assert c.n == 3
Cobra takes the first extension method it can find instead of the closest among all available.
Also, this bug is blocking further extensions being added to Cobra.Lang\ExtendIEnumerable.cobra
Change History
Note: See
TracTickets for help on using
tickets.