robb / Cartography

A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:
Other
7.34k stars 525 forks source link

Priority fix and compiler bug workaround #242

Closed JohnCoates closed 8 years ago

JohnCoates commented 8 years ago

This fixes the error “PrioritySpec.swift:22:28: Adjacent operators are in unordered precedence groups 'AssignmentPrecedence' and 'CarthographyPriorityPrecedence’” noted in issue https://github.com/robb/Cartography/issues/241

It also works around the bug “PrioritySpec.swift:22:48: Cannot assign value of type 'NSLayoutConstraint' to type 'NSLayoutConstraint!’” by switching out the priority Int for a Float.

This workaround is necessary as there’s a Swift compiler bug present.

References: https://bugs.swift.org/browse/SR-2823 https://openradar.appspot.com/28582961

orta commented 8 years ago

👍 awesssome