Closed
Description
With constructor tearoffs enabled, the analyzer correctly emits an error on the definition of the field in C
in the code below, but issues no errors on the access of new
on an instance of C
and on foo
in main
. I believe that all of those should be an error. This should cause a failure in co19/Language/Expressions/Instance_Creation/New/type_t05
(source here) when constructor tearoffs are enabled. See logs here but note that the analyzer run failed with an infrastructure issue . CL turning on the flag is here.
cc @eernstg @lrhn @srawlins @scheglov @devoncarew
class C {
int new = 42;
}
main() {
new C().new is int;
dynamic foo;
foo.new;
foo.new();
}