--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java Mon Sep 09 11:43:16 2019 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java Wed Nov 27 09:00:01 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, 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
@@ -165,7 +165,9 @@
* @return true, if given feature is a preview feature.
*/
public boolean isPreview(Feature feature) {
- if (feature == Feature.TEXT_BLOCKS)
+ if (feature == Feature.PATTERN_MATCHING_IN_INSTANCEOF ||
+ feature == Feature.REIFIABLE_TYPES_INSTANCEOF ||
+ feature == Feature.TEXT_BLOCKS)
return true;
//Note: this is a backdoor which allows to optionally treat all features as 'preview' (for testing).
//When real preview features will be added, this method can be implemented to return 'true'