• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Swift 2 throws from init()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift 2 throws from init()


  • Subject: Re: Swift 2 throws from init()
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 01 Jul 2015 17:29:01 -0700

> On Jul 1, 2015, at 4:49 PM, Rick Mann <email@hidden> wrote:
>
> I'm trying to define a Swift wrapper around CGContext. I want to assert that a Context object, if successfully initialized, will always have a valid CGContextRef property. Since at least one of my initializers can fail, I set it up as "throws".
>
> After getting the actual init code to compile, I've run into this: "error: all stored properties of a class instance must be initialized before throwing from an initializer"

According to Chris Lattner (on the swift-language mailing list) this is a known problem in the current compiler and will be fixed.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Swift 2 throws from init() (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Swift 2 init() with CF types and throws
  • Next by Date: Re: Swift 2 throws from init()
  • Previous by thread: Re: Swift 2 throws from init()
  • Next by thread: Loading .dylib problem
  • Index(es):
    • Date
    • Thread