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

feat(check): Let type aliases be referred via projection #375

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

Marwes
Copy link
Member

@Marwes Marwes commented Nov 2, 2017

Since we want to provide the correct spans in the errors I had to hook into the ast type translation which was slightly awkward (need to clone type_cache to make lifetimes work).

Example

type Test = Int
let module = { Test }
let x : module.Test = 1
x

Closes #192

Fixes #370

Since we want to provide the correct spans in the errors I had to hook into the ast type translation which was slightly awkward (need to clone `type_cache` to make lifetimes work).

## Example

```f#
type Test = Int
let module = { Test }
let x : module.Test = 1
x
```

Closes gluon-lang#192

Fixes gluon-lang#370
@Marwes
Copy link
Member Author

Marwes commented Nov 2, 2017

I realized that it was actually quite simple to implement this so I figured I might as well do it instead of removing rule from the grammar!

@brendanzab brendanzab merged commit fb4e2f2 into gluon-lang:master Nov 3, 2017
@Marwes Marwes deleted the type_projection branch November 3, 2017 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants