Error should point to offending line, not object being incorrectly used
@steveno
Submitted by Steven Oliver Link to original bug (#792413)
Description
Using this test case:
class Foo {
public string field;
}
void main () {
var foo = (string) Foo.field;
}
The reported error message is:
test.vala:2.2-2.20: error: Invalid access to instance member `Foo.field'
public string field;
^^^^^^^^^^^^^^^^^^^
Instead, it would be a lot more helpful if the message pointed to the offending line in main(). Something like:
test.vala:6.6-6.20: error: Invalid access to instance member `Foo.field'
var foo = (string) Foo.field;
^^^^^^^^^^^^^^^^^^^
Version: 0.39.x
Edited by Rico Tzschichholz