Compiler crash when referencing 'Self' from a stored property initializer in an extension

Number:rdar://FB7597747 Date Originated:24/02/2020
Status:Resolved Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
The swift compiler crashes (instead of giving a compile-time error) when referencing `Self` from a stored property initializer.

Example code:

import Foundation

class A {}

extension A {
  static let b = Self.c // this crashes the compiler
  static let c = 3


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!