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

Need compiler error to disallow enhancing a recursive type bound with a structure #97

Open
DPUkyle opened this issue Feb 23, 2017 · 0 comments
Assignees
Labels

Comments

@DPUkyle
Copy link
Member

DPUkyle commented Feb 23, 2017

See example:

Kaboom.gs

structure Kaboom {
  property Bang : String
}

KaboomEnhancement.gsx

enhancement KaboomEnhancement : Iterable<T extends Kaboom> {}

TNT.gsp

uses java.nio.file.Paths

var somePath = Paths.get("", {}).toFile() //returns a Path, which is Iterable<Path>

This example creates a cycle in TypeInfo verification within the compiler. For now, we should disallow enhancing recursive types bound by a structure, like KaboomEnhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants