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

type Obj[A; B: not A] = object is accepted but doesn't work as expected #10739

Open
GULPF opened this issue Feb 25, 2019 · 0 comments
Open

type Obj[A; B: not A] = object is accepted but doesn't work as expected #10739

GULPF opened this issue Feb 25, 2019 · 0 comments
Labels
Generics Invalid Code Acceptance Everything related to compiler not complaining about invalid code

Comments

@GULPF
Copy link
Member

GULPF commented Feb 25, 2019

Generic symbols can be referenced in generic constraints, but it seems like semcheck doesn't handle it properly.

Example

type
  Obj[A; B: not A] = object
  Obj2 = Obj[int, int]

Current Output

Compiles successfully.

Expected Output

An error stating that Obj[int, int] is an invalid type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Generics Invalid Code Acceptance Everything related to compiler not complaining about invalid code
Projects
None yet
Development

No branches or pull requests

2 participants