Fix empty interface compile crash#2197
Conversation
|
Right now, interfaces only describe what's present in classes that implement them, but don't have own storage. These are more like types. As such, constructing an interface from an object literal, as in the test, would be limited to this exact test case where there is no actual data. Is this the intention, to just unblock this specific case? |
|
I see what you mean. Implementing hidden classes that implement interfaces would solve this problem more elegantly than just adjusting asserts, though this solution would work. I guess I will just have to wait for interface hidden classes to be implemented. Would a better temporary solution be to error when using interfaces in this fashion? |
|
Producing a proper error seems preferable for now, yeah, until we know more. Hitting the asserts there is definitely a bug. |
|
Thanks! :) |
A while ago I reverse engineered the stack trace of #2085 to find this bug
Since interfaces are extended from classes, the asserts can be modified to check for interfaces.