Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7889] Expression too complex Regression #50424

Open
an0 mannequin opened this issue Jun 6, 2018 · 4 comments
Open

[SR-7889] Expression too complex Regression #50424

an0 mannequin opened this issue Jun 6, 2018 · 4 comments
Labels
access control Feature → modifiers: Access control and access levels bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.2 type checker Area → compiler: Semantic analysis

Comments

@an0
Copy link
Mannequin

an0 mannequin commented Jun 6, 2018

Previous ID SR-7889
Radar rdar://problem/40875282
Original Reporter @an0
Type Bug
Environment

Xcode 10 beta 1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 4.2Regression, TypeChecker
Assignee None
Priority Medium

md5: 47f8458bb14de431fbe827ed1cc7dcfb

Issue Description:

This is a regression. It was OK in Swift 4.1.2 but now is too complex in Swift 4.2:

import SceneKit

let m = SCNMatrix4()
let ss = [m.m11, m.m12, m.m13, m.m14, m.m21, m.m22, m.m23, m.m24, m.m31, m.m32, m.m33, m.m34, m.m41, m.m42, m.m43, m.m44].map { $0.description }
let columnWidths = [max(ss[0].count, ss[4].count, ss[8].count, ss[12].count),
                    max(ss[1].count, ss[5].count, ss[9].count, ss[13].count),
                    max(ss[2].count, ss[6].count, ss[10].count, ss[14].count),
                    max(ss[3].count, ss[7].count, ss[11].count, ss[15].count)]
@belkadan
Copy link
Contributor

belkadan commented Jun 6, 2018

cc @rudkx, @xedin

@xedin
Copy link
Member

xedin commented Jun 6, 2018

@an0 As a workaround you can use contextual type for [Int] on columnWidths to make it compile again.

@rudkx
Copy link
Member

rudkx commented Jun 7, 2018

@swift-ci create

@an0
Copy link
Mannequin Author

an0 mannequin commented Jun 7, 2018

@xedin Thanks for the workaround.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added regression swift 4.2 access control Feature → modifiers: Access control and access levels and removed 4.2 regression labels Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
access control Feature → modifiers: Access control and access levels bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 4.2 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

4 participants