-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P4dart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language speclegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
In the following example:
final int x = 3;
class A {
int x = 3;
}
class B extends A {
void test() {
x = 4;
}
}The specification requires that the reference to x resolve to the top level definition of x, for which no setter is defined, and hence should be a static error.
Evaluation of an assignment $a$ of the form \code{$v$ = $e$}
proceeds as follows:
%% TODO(eernst): $d$ is defined ambiguously: both getter & setter may exist.
Let $d$ be the innermost declaration whose name is $v$ or \code{$v$=}, if it exists.
It is a compile-time error if $d$ denotes
a prefix object, type declaration, or function declaration.
The CFE resolves this correctly, so there is an inconsistency between the tools. See this comment for more discussion.
See also:
Metadata
Metadata
Assignees
Labels
P4dart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language speclegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)