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

Unresolved structure fields in initializer #1877

Closed
zolotov opened this issue Sep 19, 2015 · 0 comments
Closed

Unresolved structure fields in initializer #1877

zolotov opened this issue Sep 19, 2015 · 0 comments
Assignees
Milestone

Comments

@zolotov
Copy link
Contributor

zolotov commented Sep 19, 2015

package main
func main() {
    type policyTableEntry struct {
        Prefix     string
        Precedence uint8
        Label      uint8
    }

    type policyTable []policyTableEntry

    var _ = policyTable{
        {
            Prefix:     "test", // shouldn't be a error
            Precedence: 50, // shouldn't be a error
            Label:      0, // shouldn't be a error
        },
        {
            Prefix:     "test2", // shouldn't be a error
            Precedence: 40, // shouldn't be a error
            Label:      1, // shouldn't be a error
        },
    }
}
@zolotov zolotov added this to the 1.0.0 milestone Sep 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants