Skip to content

Turn compile-time errors into static warnings #1031

Closed

Description

@gbracha

There are a number of situations that are specified to be compile-time errors, but which might be treated as static warnings instead. This would be desirable, because compile-time errors impose a workflow: one must resolve them before moving forward to testing/running the program. It would be more in keeping with the spirit of Dart to "get out of the developer's way".

We should do a systematic sweep of these issues and decide which ones can be liberalized in this fashion.

Activity

  1. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #970.

  2. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #972.

  3. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #974.

  4. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #975.

  5. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #976.

  6. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #977.

  7. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #978.

  8. iposva-google commented on Jan 3, 2012

    @iposva-google
    Contributor

    Marked this as blocking #980.

  9. iposva-google commented on Mar 16, 2012

    @iposva-google
    Contributor

    Gilad, has this sweep been completed?

  10. gbracha commented on Mar 16, 2012

    @gbracha
    ContributorAuthor

    No. All discussions that require approval from AAR have been put off to
    next week.

  11. anders-sandholm commented on May 8, 2012

    @anders-sandholm

    Added this to the M1 milestone.

  12. gbracha commented on May 18, 2012

    @gbracha
    ContributorAuthor

    Added Started label.

  13. gbracha commented on Jun 8, 2012

    @gbracha
    ContributorAuthor

    Also related are:

    issue #3078
    issue #3080
    issue #3084
    issue #3085
    issue #3086
    issue #3087
    issue #3088
    issue #3089
    issue #3093
    issue #3094
    issue #3095

  14. gbracha commented on Jun 11, 2012

    @gbracha
    ContributorAuthor

    The spec for these is done. Implementation in progress.

  15. gbracha commented on Jun 11, 2012

    @gbracha
    ContributorAuthor

    Added Done label.

  16. gbracha commented on Jun 20, 2012

    @gbracha
    ContributorAuthor

    One more case of relaxation. Latest version of spec, section 10.10.1 replaces errors with warnings in cases where the class or the constructor is undeclared. Motivation is similar to other cases: do not impose workflow - just warn and make it a dynamic error.

    "Let e be a new expression of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) or the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k). It is a static warning if T is not a class or interface accessible in the current scope, optionally followed by type arguments.

    If e is of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if T.id is not the name of a constructor declared by the type T. If e of the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if the type T does not declare a constructor with the same name as the declaration of T.
    "

  17. gbracha commented on Jun 20, 2012

    @gbracha
    ContributorAuthor

    One more case of relaxation. Latest version of spec, section 10.10.1 replaces errors with warnings in cases where the class or the constructor is undeclared. Motivation is similar to other cases: do not impose workflow - just warn and make it a dynamic error.

    "Let e be a new expression of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) or the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k). It is a static warning if T is not a class or interface accessible in the current scope, optionally followed by type arguments.

    If e is of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if T.id is not the name of a constructor declared by the type T. If e of the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if the type T does not declare a constructor with the same name as the declaration of T.
    "

  18. gbracha commented on Jun 20, 2012

    @gbracha
    ContributorAuthor

    One more case of relaxation. Latest version of spec, section 10.10.1 replaces errors with warnings in cases where the class or the constructor is undeclared. Motivation is similar to other cases: do not impose workflow - just warn and make it a dynamic error.

    "Let e be a new expression of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) or the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k). It is a static warning if T is not a class or interface accessible in the current scope, optionally followed by type arguments.

    If e is of the form new T.id(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if T.id is not the name of a constructor declared by the type T. If e of the form new T(a1, .., an, xn+1: an+1, …, xn+k: an+k) it is a static warning if the type T does not declare a constructor with the same name as the declaration of T.
    "

  19. gbracha commented on Jun 20, 2012

    @gbracha
    ContributorAuthor

    Added

    Analyzer issue #3800.
    VM issue #3801.
    dart2js issue #3802.

  20. self-assigned this
    on Jun 20, 2012
  21. added this to the M1 milestone on Jun 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions