Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test attempts to validate static warning, but is not valid #11575

Open
scheglov opened this issue Jun 28, 2013 · 12 comments
Open

Test attempts to validate static warning, but is not valid #11575

scheglov opened this issue Jun 28, 2013 · 12 comments
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@scheglov
Copy link
Contributor

language/abstract_factory_constructor_test/00

  1. If "should not emit a static type warning", then why there is "/// 00: static type warning" annotation?
  2. This test still will produce warnings because classes A1 and A2 are concrete, but have abstract members.

// Exercises issue #2282, factory constructors in abstract classes should
// not emit a static type warning

class B extends A1 {
  B() {}
  method() {}
}

class A1 {
  A1() {}
  method(); // Abstract.
  factory A1.make() { return new B(); }
}

class A2 {
  method(); // Abstract.
  A2.make() {}
}

main() {
  new A1.make();
  new A2.make(); /// 00: static type warning
}

@scheglov
Copy link
Contributor Author

Same for language/abstract_factory_constructor_test/none

It also generates warnings for abstract members in concrete classes.

@scheglov
Copy link
Contributor Author

language/abstract_syntax_test/none

@scheglov
Copy link
Contributor Author

language/get_set_syntax_test/none

@scheglov
Copy link
Contributor Author

language/implicit_this_test/none

Abstract method in concrete class, as all tests in this issue.

And also not initialized final instance variable.

abstract class Interface {
  final x;
}

@scheglov
Copy link
Contributor Author

language/interface_test/none

@scheglov
Copy link
Contributor Author

language/syntax_test/none

@ricowind
Copy link
Contributor

cc @peter-ahe-google.
cc @kasperl.

@larsbak
Copy link

larsbak commented Aug 28, 2013

Removed this from the M6 milestone.
Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the M7 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@scheglov scheglov added Type-Defect area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). labels Aug 4, 2014
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@eernstg
Copy link
Member

eernstg commented Nov 3, 2017

Concerning language{,_2}/get_set_syntax_test/none: I'm adjusting this test in this CL, so the spurious compile-time error will be gone when that lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

6 participants