--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Mon Sep 09 11:43:16 2019 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java Wed Nov 27 09:00:01 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -1558,6 +1558,12 @@
env.tree = transTypes.translateTopLevelClass(env.tree, localMake);
compileStates.put(env, CompileState.TRANSTYPES);
+ if (shouldStop(CompileState.TRANSPATTERNS))
+ return;
+
+ env.tree = TransPatterns.instance(context).translateTopLevelClass(env, env.tree, localMake);
+ compileStates.put(env, CompileState.TRANSPATTERNS);
+
if (Feature.LAMBDA.allowedInSource(source) && scanner.hasLambdas) {
if (shouldStop(CompileState.UNLAMBDA))
return;