Closed alexnask closed 8 years ago
Here is a simpler case:
Foo: cover template <T> {
val: T
init: func@ (=val)
}
foo: Foo<Int>
Which leads to [Exception in BaseType]: Trying to write unresolved type T
, which is the exact same bug.
Of course, accessing val leads to Foo<Int>
being resolved but this should be done automatically on instanciation (which may prove to be quite the challenge)
For example:
Here,
Foo<Int>
is never resolved (both with master and my class_template branch), init is never resolved, leading to =fn never being resolved and not getting a type, which the backend tries to write blindly.The result, unsurprisingly, is a segfault.
(For some reason, the exact same code with class instead of cover and func instead of func@ has its instance resolved on my class_template branch).
It looks like we are relying on something wholeAgain-ing at the moment, which should not be the case.