Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7115044 Umbrella: Add support for lambda expressions
  3. JDK-7175911

Simplify error reporting API in Check.CheckContext interface

    XMLWordPrintable

Details

    • b52
    • unknown
    • generic
    • Not verified

    Description

      The CheckContext interface currently defines a method for logging type mismatch that accepts the following parameters:

      *) a diagnostic position
      *) a found type
      *) an expected type
      *) a details diagnostic

      The report method is used in two ways (mostly orthogonal):

      1) simple type mismatch error (of the kind found/req) are reported by using the found/req parameters and by setting the diagnostic to null

      2) complex mismatch errors (i.e. caused by inference failures) do not use found/req - they only rely on the diagnostic param.

      CheckContext's interface for reporting errors should be simplified to only accept a diagnostic (reason as to why a type mismatch has occurred). Info about found/req types, where available, should be encapsulated inside the details diagnostic.

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: