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

fix #32325, struct plus outer ctor inside let #32326

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Conversation

JeffBezanson
Copy link
Sponsor Member

Fixes #32325. It's a bit ambiguous whether the function definition is meant to be a local variable, but if you replace struct with abstract type or primitive type the function is taken to be a constructor, so this just makes struct work the same way. That is almost certainly the intended/more useful behavior.

@JeffBezanson JeffBezanson added compiler:lowering Syntax lowering (compiler front end, 2nd stage) kind:bugfix This change fixes an existing bug labels Jun 14, 2019
@JeffBezanson JeffBezanson merged commit 6451bdd into master Jun 18, 2019
@JeffBezanson JeffBezanson deleted the jb/fix32325 branch June 18, 2019 06:04
@StefanKarpinski
Copy link
Sponsor Member

Backportable or minor change? Or neither?

@JeffBezanson
Copy link
Sponsor Member Author

Backportable back to 1.0, but I'll wait around a while to make sure there are no unintended consequences.

KristofferC pushed a commit that referenced this pull request Jul 1, 2019
@KristofferC KristofferC mentioned this pull request Jul 1, 2019
32 tasks
@KristofferC KristofferC mentioned this pull request Aug 26, 2019
55 tasks
@KristofferC KristofferC mentioned this pull request Dec 3, 2019
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage) kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defining a struct with an outer constructor in local scope gives bad error
3 participants