C# extension failed to make default impl for INSFastEnumeration<T> on iOS


(James Esword) #1

IDE: VS 2015
Version: 8.4.96.2037
Target (If relevant): iOS
Description:

public interface TestIf<T> : INSFastEnumeration<T>{
    void doSth(T value);
}

public __extension class TestIfDefault<T> : TestIf<T>{
    public NSUInteger countByEnumeratingWithState(NSFastEnumerationState* state) objects(T * buffer) count(NSUInteger len) {
        return 0;
    }
}

/*
    Compile error: (E179) Method "NSUInteger countByEnumeratingWithState(NSFastEnumerationState* aState) objects(NSString* stackbuf) count(NSUInteger len)" not implemented as required for interface "iOSTest.TestIf<NSString>"
*/
public class TestClass : TestIf<string>{
    public void doSth(string value) {}
}

(RemObjects) #2

Thanks, logged as bugs://76109


(James Esword) #3

@ck
I’m wondering if there’s any clue for this issue till now?
It prevents me from making a cross-platform Iterable<T> interface which is very helpful.


(Carlo Kok) #4

It’s logged. I haven’t gotten around to doing it yet, but it’s probably some fluke due to generics.


(James Esword) #5

Thank you, Carlo. Just ensure this issue is not missed.


(RemObjects) #6

bugs://76109 got closed with status fixed.