Skip to content

Missing error when directly calling field #32975

@askeksa-google

Description

@askeksa-google

If a field or getter is called directly, and the field or getter is not of a callable type, the expression is silently accepted.

From language_2/call_non_method_field_test:

class Fisk {
  int i;
}

main() {
  Fisk x1 = new Fisk();
  x1.i(); //# 01: compile-time error
}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions