openclover / clover

This repository contains source code of OpenClover Core as well as its integrations: Clover-for-Ant, Clover-for-Eclipse and Clover-for-IDEA plugins. Sources are licensed under Apache 2.0 license.
Other
57 stars 14 forks source link

Support Java14 instanceof pattern matching #214

Closed marek-parfianowicz closed 8 months ago

marek-parfianowicz commented 8 months ago

Java 14 introduced pattern matching for instanceof keyword, which allows to create a variable for the type matched, without type casting. Example:

int sum = 0; if (o instanceof Integer i) { sum += i; }

To be implemented: optional identifier after type declaration.