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

Compiler treats alias as a type if it matches both #7

Open
crosjef opened this issue Jun 11, 2019 · 0 comments
Open

Compiler treats alias as a type if it matches both #7

crosjef opened this issue Jun 11, 2019 · 0 comments

Comments

@crosjef
Copy link

crosjef commented Jun 11, 2019

In this example, the compiler gives an "overridden types" error on the last line (Length : 2) because it matches that to the 2 : Hole Size type, which is invalid in this context.

If the matching type is invalid but treating the annotation as an alias is valid, I think that would be the expected behaviour.

Type
mm, Hole Size, Product, SKU : Type

/\d+\.?\d* : mm

0, 1, 2, 3, 4 : Hole Size

Machine Screw : Product
	Length : mm
	
1111 : SKU, Machine Screw
	Length : 22
	
2222 : SKU, Machine Screw
	Length : 2
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

No branches or pull requests

1 participant