Hello,

This code causes a segmentation fault:

struct MyHeapElement<T:Comparable>
        {
        var index:Int
        var     key:T
        }

struct MyHeap<T:Comparable>
        {
        var elements = [MyHeapElement<T>]()
        }

extension MyHeap
        {
        init( withElements elements:[MyHeapElement<T>] )
                {
                self.elements = elements
                }
        }

Do I have a syntax error somewhere or is this a compiler bug (apart from that ideally the compiler should never crash)?

Swift 2.1-2.2

Jan E.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to