The Swift compiler segfaults when using a class with a generic parameter as the generic parameter of another class

Originator:juangabriel.arzola
Number:rdar://27837891 Date Originated:13-Aug-2016
Status:Open Resolved:
Product:Xcode Product Version:8.0 Beta 5 8S193k
Classification:Bug Reproducible:Always
 
The following code uses a generic class as the generic parameter of another class:

public class Wrapper<T>{
  var backingElement:T
  public required init (backingElement:T){
    self.backingElement = backingElement
  }
}

public class WrappingCollection<ContainedType, Element:Wrapper<ContainedType>> {
  let containedElements: [ContainedType]
  init(containedElements:[ContainedType]){
		self.containedElements = containedElements
	}
}

Expected result: it compiles

Actual result: the Swift compiler segfaults

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!