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

error in kind checking: higher-order type parameters #3374

Closed
scabug opened this issue Apr 30, 2010 · 4 comments
Closed

error in kind checking: higher-order type parameters #3374

scabug opened this issue Apr 30, 2010 · 4 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Apr 30, 2010

trait Parent {
 type Test[A, H[B <: A]]
}
trait Sub extends Parent {
 type Test[A, H[B <: A]] = A
}

should type check, but instead complains:

Top.scala:5: The kind of type Test does not conform to the expected kind of
type Test[A,H[B <: A]] in trait Parent.
Sub.this.Test's type parameters do not match type Test's expected parameters:
type B (in trait Sub)'s bounds >: Nothing <: A are stricter than type B (in
trait Parent)'s declared bounds >: Nothing <: A
 type Test[A, H[B <: A]] = A
      ^

the problem is likely in this line in Infer.scala:

if (!(transform(hkparam.info.instantiateTypeParams(tparams, targs).bounds.substSym(hkparams, hkargs), paramowner) <:< transform(hkarg.info.bounds, owner)))
@scabug
Copy link
Author

scabug commented Apr 30, 2010

Imported From: https://issues.scala-lang.org/browse/SI-3374?orig=1
Reporter: @adriaanm

@scabug
Copy link
Author

scabug commented May 13, 2010

@harrah said:
Thanks for looking at this, Adriaan. I got around to publishing what I'm working on if it is helpful:

http://github.com/harrah/up

HLists, type-level binary numbers, and type-level binary search tree maps.

@scabug
Copy link
Author

scabug commented Jul 8, 2010

@adriaanm said:
(In r22512) closes #3374. checkKindBoundsHK did not instantiate hk params far enough. see also neg/bug1275
review by odersky

@scabug
Copy link
Author

scabug commented Aug 13, 2010

@adriaanm said:
(In r22754) closes #3419: test files

omit check that wouldn't work with separate compilation,
not needed anymore because compiler has become more robust

the actual fix was committed as part of r22512, see #3374

also see #3512

no review

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