mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
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:
parent
2d34acfec9
commit
0155e4b76b
53 changed files with 685 additions and 456 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue