Giter Club home page Giter Club logo

Comments (8)

radex avatar radex commented on September 25, 2024

SwiftInFlux is not a list of bugs in Swift.

from swiftinflux.

danielgomezrico avatar danielgomezrico commented on September 25, 2024

That shows a change on the compiler/IDE not a bug.

from swiftinflux.

radex avatar radex commented on September 25, 2024

I don't think I understand.

from swiftinflux.

danielgomezrico avatar danielgomezrico commented on September 25, 2024

I had that line compiling in XCode 6.1 but it marks as an error in XCode 6.3 beta
Expected experssion for size of array type

and if you add some parentesis it compile:
let newUserInfo = (error.userInfo as? [NSObject:NSObject]) ?? [:]

Still not the objective of SwiftInFlux?

from swiftinflux.

jklausa avatar jklausa commented on September 25, 2024

Ultimately, no.

This seems like a regression in a compiler, and I believe you should definitely file a radar about that, but that doesn't look like a deliberate change in the language semantics to me.

from swiftinflux.

radex avatar radex commented on September 25, 2024

Hm. It looks like the as? operator has changed its precedence (it's now lower than ??) — I checked and ?? has the same precedence as before.

I dunno, it is a change, but I would never make the assumption that error.userInfo as? [NSObject: NSObject] ?? [:] did what you expected to. I'd put it in parens anyway.

@jklausa? @ksm?

from swiftinflux.

jklausa avatar jklausa commented on September 25, 2024

Oh, snap, right, the precedence did change. Totally forgot about it! I'm not so sure myself now.

from swiftinflux.

radex avatar radex commented on September 25, 2024

Turns out, it is a bug :)

https://devforums.apple.com/message/1102772#1102772

Should be fixed in the next beta.

from swiftinflux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.