8282274: Compiler implementation for Pattern Matching for switch (Third Preview)

Co-authored-by: Brian Goetz <briangoetz@openjdk.org>
Co-authored-by: Jan Lahoda <jlahoda@openjdk.org>
Reviewed-by: mcimadamore, vromero, abimpoudis
This commit is contained in:
Jan Lahoda 2022-05-16 07:49:26 +00:00
parent 2d34acfec9
commit 0155e4b76b
53 changed files with 685 additions and 456 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -71,7 +71,7 @@ public class NestedPatternVariablesBytecode extends TestRunner {
String code = """
class NestedPatterVariablesTest {
String test(Object o) {
if (o instanceof (CharSequence cs && cs instanceof String s)) {
if (o instanceof CharSequence cs && cs instanceof String s) {
return s;
}
return null;