uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Validation: Static check for native methods not implemented in the native code #779

Closed javierfernandes closed 8 years ago

javierfernandes commented 8 years ago

If you declare a method as native and you don't have that method implemented in the native code, then it should detect that, since it will fail in runtime.

In general terms this shows that the natives mechanism is kind of fragile right now. I can think of two improvements:

When dispatching a native message if there are no method in the native but the method was declared as native in wollok then we should give an specific error message like "method blah() is declared native but not implemented natively !!" It would be great to have some kind of static check for this. It can be complex because the validator should resolve the native class from the classpath or something.

javierfernandes commented 8 years ago

Sorry, dup from #776