Greetings

Old chestnut, sort of partially solved but still problems.

Now we can nest types in generic types, what I want is :

class Event<typeT>
{
  class Args
  {
    public static let empty = Args() // error : Static stored properties not 
supported in generic types
  }
}

But the static let is not directly in the generic class.

So, I end up doing another convoluted workaround in the shape of :

class Event<typeT>
{
  class Args
  {
    public static var empty: Args
    {
      return Args()
    }
  }
}

The main difference is that I have to create a new instance on every call to 
Args.empty instead of returning the same one.

Is this an oversight or as intended, with the hope of fixing it in a future 
version

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to