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

Allow 'use' in class scope #6872

Open
lydia-duncan opened this issue Jul 28, 2017 · 0 comments
Open

Allow 'use' in class scope #6872

lydia-duncan opened this issue Jul 28, 2017 · 0 comments

Comments

@lydia-duncan
Copy link
Member

The spec and compiler currently don't allow 'use' statements at the same scope as field and method declarations. It seems useful to do so, for 'use' of both enums and classes.

Steps to Reproduce

Source Code:

enum classTag { field1, field2};

class Foo {
  use classTag;

  var tag: classTag = field1;
}

Compile command:
chpl foo.chpl

Associated Future Test(s):
test/types/enum/lydia/declaredInClass2.chpl
test/types/enum/lydia/useAtClassScope.chpl
#6870

Configuration Information

  • Output of chpl --version: 1.16.0 (prerelease)
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

1 participant