groovy
  1. groovy
  2. GROOVY-5332

Map<String,Integer> is recognized as Map<String,String> by the type checker

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-2
    • Fix Version/s: 2.0-beta-3
    • Component/s: Static Type Checker
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The following code fails:

      Map<String,Integer> foo = new HashMap<String,Integer>()
      foo.put('foo', 1)
      

      because the type checker aligns the V placeholder in <K,V> with String instead of Integer.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            CÚdric Champeau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: