Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openjdk/amber
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3c4e824a
Choose a base ref
...
head repository: openjdk/amber
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e0aa5308
Choose a head ref

Commits on Sep 23, 2017

  1. 8186967: Unused methods in MotifGraphicsUtils can be removed

    Reviewed-by: azvegint
    mrserb committed Sep 23, 2017
    Copy the full SHA
    8ea9b74 View commit details
  2. 8175968: The javax.swing.filechooser.FileSystemView constructor consu…

    …mes memory by adding a PropertyChangeListener that is never removed
    
    Reviewed-by: azvegint
    mrserb committed Sep 23, 2017
    Copy the full SHA
    e5566ac View commit details
  3. 6238123: Typos at Serialized Form javadoc for java.awt.Polygon

    Reviewed-by: prr, pnarayanan
    mrserb committed Sep 23, 2017
    Copy the full SHA
    1b2b0e8 View commit details
  4. 8178274: Java_sun_lwawt_macosx_NSEvent_nsToJavaKeyInfo() overreads jc…

    …har variable
    
    Reviewed-by: ssadetsky
    Artem Smotrakov committed Sep 23, 2017
    Copy the full SHA
    0b924bf View commit details

Commits on Sep 25, 2017

  1. 6857809: [TEST_BUG] java/awt/Component/PrintAllXcheckJNI/PrintAllXche…

    …ckJNI.java fails in jdk7 b64 pit build
    
    Co-authored-by: Dmitry Cherepanov <dcherepanov@azul.com>
    Reviewed-by: serb, ssadetsky
    2 people authored and aghaisas committed Sep 25, 2017
    Copy the full SHA
    94a925b View commit details
  2. 8081311: [TEST_BUG] java/awt/ComponentOrientation/WindowTest.java doe…

    …s use deprecated applyResourceBundle
    
    Reviewed-by: serb, ssadetsky
    pankaj-bansal authored and aghaisas committed Sep 25, 2017
    Copy the full SHA
    6b7c509 View commit details
  3. 8154468: [TEST_BUG] java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTe…

    …st.java
    
    Reviewed-by: serb, ssadetsky
    pankaj-bansal authored and aghaisas committed Sep 25, 2017
    Copy the full SHA
    b8ca97f View commit details
  4. Copy the full SHA
    8957cbe View commit details
  5. Copy the full SHA
    f490095 View commit details
  6. Copy the full SHA
    9a8992e View commit details
  7. Copy the full SHA
    56e6c63 View commit details

Commits on Sep 26, 2017

  1. 8088132: [Swing, singleThread] ClassCastException in nested event loo…

    …p when showing multiple message dialogs in SwingNode
    
    Reviewed-by: serb
    prsadhuk committed Sep 26, 2017
    Copy the full SHA
    ebf03d1 View commit details
  2. Manual merge

    mcimadamore committed Sep 26, 2017
    Copy the full SHA
    7f8b455 View commit details

Commits on Sep 28, 2017

  1. Merge

    prrace committed Sep 28, 2017
    Copy the full SHA
    1c89e3a View commit details
  2. Merge

    prrace committed Sep 28, 2017
    Copy the full SHA
    fd49cc9 View commit details
  3. Copy the full SHA
    75705aa View commit details

Commits on Oct 2, 2017

  1. Blaser:

    Reviewed-by: mcimadamore
    bsrbnd authored and Vicente Romero committed Oct 2, 2017
    Copy the full SHA
    a683578 View commit details
  2. Delta applying patch for JDK-8187978

    Vicente Romero committed Oct 2, 2017
    Copy the full SHA
    39f4d5a View commit details
  3. Copy the full SHA
    9bb163c View commit details
  4. Manual merge

    mcimadamore committed Oct 2, 2017
    Copy the full SHA
    41a6652 View commit details

Commits on Oct 3, 2017

  1. Copy the full SHA
    57fd29e View commit details

Commits on Oct 4, 2017

  1. 8004029: [macosx] The long Tab titles are not clipped with dots at th…

    …e end
    
    Reviewed-by: serb, psadhukhan
    Shashidhara Veerabhadraiah authored and aghaisas committed Oct 4, 2017
    Copy the full SHA
    0e98281 View commit details

Commits on Oct 5, 2017

  1. Copy the full SHA
    cbc5b6a View commit details
  2. 8188779: Synchronize test/jdk/sanity/client/lib/jemmy with code-tools…

    …/jemmy/v2
    
    Reviewed-by: serb, ssadetsky
    shurymury committed Oct 5, 2017
    Copy the full SHA
    c640ec6 View commit details

Commits on Oct 7, 2017

  1. 8155197: Focus transition issue

    Reviewed-by: serb, ssadetsky, aivanov
    dmarkov20 committed Oct 7, 2017
    Copy the full SHA
    513abd0 View commit details

Commits on Oct 9, 2017

  1. 8187989: Documentation error in JComponent.paintComponent

    Reviewed-by: ssadetsky, serb
    prsadhuk committed Oct 9, 2017
    Copy the full SHA
    a4bc352 View commit details
  2. Merge

    prrace committed Oct 9, 2017
    Copy the full SHA
    82040f1 View commit details

Commits on Oct 10, 2017

  1. 8188824: sanity/client/SwingSet/src/ProgressBarDemoTest: Failed with …

    …NullPointerException
    
    Reviewed-by: ssadetsky
    shurymury committed Oct 10, 2017
    Copy the full SHA
    e83a741 View commit details
  2. 8080084: java/awt/Graphics2D/DrawString/DrawStringCrash.java fails wi…

    …th G1 GC
    
    Reviewed-by: ssadetsky, pnarayanan
    prrace committed Oct 10, 2017
    Copy the full SHA
    a9cb8eb View commit details

Commits on Oct 11, 2017

  1. 8166772: Touch keyboard is not shown for text components on a screen …

    …touch
    
    Reviewed-by: serb, azvegint
    Anton Litvinov committed Oct 11, 2017
    Copy the full SHA
    dd41b76 View commit details

Commits on Oct 12, 2017

  1. 6714836: JRootPane.getMaximumSize() returns a width of 0

    Reviewed-by: psadhukhan, serb
    Krishna Addepalli authored and aghaisas committed Oct 12, 2017
    Copy the full SHA
    a980868 View commit details
  2. Copy the full SHA
    b81c894 View commit details

Commits on Oct 13, 2017

  1. 8183978: Remove ICU layout code from OpenJDK

    Reviewed-by: srl, serb
    prrace committed Oct 13, 2017
    Copy the full SHA
    4337e3f View commit details

Commits on Oct 16, 2017

  1. 8180821: [macosx]com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.ja…

    …va: The menu item should have been GC-ed
    
    Reviewed-by: prr, psadhukhan
    Semyon Sadetsky committed Oct 16, 2017
    Copy the full SHA
    12cb440 View commit details
  2. 8182638: [macosx] Active modal dialog is hidden by another non-active…

    … one
    
    Reviewed-by: azvegint, dmarkov
    Semyon Sadetsky committed Oct 16, 2017
    Copy the full SHA
    e363c82 View commit details
  3. 8187599: Remove dependency of Building Nimbus L&F on JAXB

    Reviewed-by: serb, prr
    Semyon Sadetsky committed Oct 16, 2017
    Copy the full SHA
    74e234c View commit details

Commits on Oct 17, 2017

  1. Merge

    prrace committed Oct 17, 2017
    Copy the full SHA
    8f0f21d View commit details

Commits on Oct 19, 2017

  1. 8075255: Metal L&F has dependency on the Windows L&F

    Reviewed-by: psadhukhan
    mrserb committed Oct 19, 2017
    Copy the full SHA
    4ccdfd5 View commit details
  2. 8163265: [macosx] numpad 0 instead of VK_0

    Reviewed-by: serb, azvegint
    Manajit Halder authored and Manajit Halder committed Oct 19, 2017
    Copy the full SHA
    a1d4869 View commit details
  3. Merge

    prrace committed Oct 19, 2017
    Copy the full SHA
    679360e View commit details
  4. 8189617: Remove undocumented --print-mem-usage option

    Reviewed-by: jlaskey, sundar
    hns committed Oct 19, 2017
    Copy the full SHA
    7ff7f3b View commit details
  5. Merge

    prrace committed Oct 19, 2017
    Copy the full SHA
    d36d599 View commit details
  6. Manual merge with default

    mcimadamore committed Oct 19, 2017
    Copy the full SHA
    faf1923 View commit details

Commits on Oct 26, 2017

  1. Copy the full SHA
    a000b0c View commit details

Commits on Nov 2, 2017

  1. Copy the full SHA
    28d28d8 View commit details

Commits on Nov 6, 2017

  1. Copy the full SHA
    4d37aaf View commit details

Commits on Nov 10, 2017

  1. Copy the full SHA
    b3402d0 View commit details

Commits on Nov 16, 2017

  1. Copy the full SHA
    91eb90b View commit details

Commits on Nov 23, 2017

  1. Copy the full SHA
    47b5b7d View commit details

Commits on Nov 30, 2017

  1. Copy the full SHA
    48a3215 View commit details
Showing with 1,856 additions and 272 deletions.
  1. +27 −2 .jcheck/conf
  2. +8 −3 src/java.base/share/classes/java/lang/Class.java
  3. +4 −0 src/java.base/share/classes/java/lang/Package.java
  4. +58 −0 src/jdk.compiler/share/classes/com/sun/source/tree/DeconstructionPatternTree.java
  5. +15 −0 src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java
  6. +17 −0 src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java
  7. +13 −0 src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java
  8. +14 −0 src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java
  9. +1 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java
  10. +3 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
  11. +11 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
  12. +94 −19 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
  13. +15 −3 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
  14. +9 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java
  15. +0 −41 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
  16. +1 −1 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MatchBindingsComputer.java
  17. +160 −23 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java
  18. +7 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java
  19. +9 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TreeDiffer.java
  20. +6 −1 src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
  21. +129 −34 src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
  22. +23 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
  23. +52 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java
  24. +12 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/Pretty.java
  25. +8 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeCopier.java
  26. +6 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java
  27. +6 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeScanner.java
  28. +7 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeTranslator.java
  29. +2 −0 src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
  30. +152 −2 test/langtools/tools/javac/annotations/typeAnnotations/classfile/Patterns.java
  31. +33 −0 test/langtools/tools/javac/diags/examples/DeconstructionPatternOnlyRecords.java
  32. +35 −0 test/langtools/tools/javac/diags/examples/IncorrectNumberOfNestedPatterns.java
  33. +2 −1 test/langtools/tools/javac/diags/examples/UnderscoreAsIdentifierError.java
  34. +29 −0 test/langtools/tools/javac/diags/examples/UnderscoreCantBeFollowedByDims.java
  35. +3 −1 test/langtools/tools/javac/diags/examples/UnderscoreInLambdaExpression.java
  36. +28 −0 test/langtools/tools/javac/diags/examples/UnderscoreInMethodParameters.java
  37. +30 −0 test/langtools/tools/javac/diags/examples/UnderscoreOnlyInLamdaError.java
  38. +2 −2 test/langtools/tools/javac/lambda/IdentifierTest.java
  39. +44 −0 test/langtools/tools/javac/lambda/IdentifierTest10.out
  40. +44 −44 test/langtools/tools/javac/lambda/IdentifierTest8.out
  41. +44 −44 test/langtools/tools/javac/lambda/IdentifierTest9.out
  42. +1 −1 test/langtools/tools/javac/lambda/LambdaParserTest.java
  43. +2 −1 test/langtools/tools/javac/lambda/LambdaScope04.java
  44. +3 −0 test/langtools/tools/javac/lambda/LambdaScope04_Source10.out
  45. +36 −36 test/langtools/tools/javac/lambda/{LambdaScope04.out → LambdaScope04_Source9.out}
  46. +2 −1 test/langtools/tools/javac/lambda/LambdaScope05.java
  47. +0 −7 test/langtools/tools/javac/lambda/LambdaScope05.out
  48. +7 −0 test/langtools/tools/javac/lambda/LambdaScope05_Source9.out
  49. +2 −2 test/langtools/tools/javac/lambda/UnderscoreAsIdent.java
  50. +8 −0 test/langtools/tools/javac/lambda/deduplication/Deduplication.java
  51. +3 −0 test/langtools/tools/javac/lambda/deduplication/DeduplicationTest.java
  52. +39 −0 test/langtools/tools/javac/lambda_leftovers/ShadowParametersTest01.java
  53. +60 −0 test/langtools/tools/javac/lambda_leftovers/ShadowParametersTest02.java
  54. +10 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreCantBeFollowedByDimsTest.java
  55. +3 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreCantBeFollowedByDimsTest.out
  56. +16 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInCatchClauseTest.java
  57. +2 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInCatchClauseTest.out
  58. +23 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInLambdaTest.java
  59. +2 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInLambdaTest.out
  60. +19 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInMethodsTest.java
  61. +4 −0 test/langtools/tools/javac/lambda_leftovers/UnderscoreInMethodsTest.out
  62. +1 −1 test/langtools/tools/javac/lvti/SelfRefTest.java
  63. +1 −2 test/langtools/tools/javac/lvti/SelfRefTest.out
  64. +40 −0 test/langtools/tools/javac/patterns/DeconstructionPatternErrors.java
  65. +20 −0 test/langtools/tools/javac/patterns/DeconstructionPatternErrors.out
  66. +115 −0 test/langtools/tools/javac/patterns/PrettyTest.java
  67. +246 −0 test/langtools/tools/javac/patterns/SimpleDeconstructionPattern.java
  68. +17 −0 test/langtools/tools/javac/patterns/SimpleDeconstructionPatternNoPreview.out
  69. +11 −0 test/langtools/tools/javac/sealed/SealedCompilationTests.java
29 changes: 27 additions & 2 deletions .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
;
; Copyright (c) 2020, 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
; under the terms of the GNU General Public License version 2 only, as
; published by the Free Software Foundation.
;
; This code is distributed in the hope that it will be useful, but WITHOUT
; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; version 2 for more details (a copy is included in the LICENSE file that
; accompanied this code).
;
; You should have received a copy of the GNU General Public License version
; 2 along with this work; if not, write to the Free Software Foundation,
; Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
;
; Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
; or visit www.oracle.com if you need additional information or have any
; questions.
;

[general]
project=jdk
jbs=JDK
project=amber
repository=amber
jbs=jdk

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
@@ -29,5 +53,6 @@ role=committer
[checks "issues"]
pattern=^([124-8][0-9]{6}): (\S.*)$


[checks "problemlists"]
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp
11 changes: 8 additions & 3 deletions src/java.base/share/classes/java/lang/Class.java
Original file line number Diff line number Diff line change
@@ -4424,17 +4424,22 @@ public ClassDesc[] permittedSubclasses() {
}

/**
* * {@preview Associated with sealed classes, a preview feature of the Java language.
* {@preview Associated with sealed classes, a preview feature of the Java language.
*
* This method is associated with <i>sealed classes</i>, a preview
* feature of the Java language. Preview features
* may be removed in a future release, or upgraded to permanent
* features of the Java language.}
*
* Returns {@code true} if and only if this {@code Class} object represents a sealed class or interface.
* If this {@code Class} object represents a primitive type, {@code void}, or an array type, this method returns
* Returns {@code true} if and only if this {@code Class} object represents
* a sealed class or interface. If this {@code Class} object represents a
* primitive type, {@code void}, or an array type, this method returns
* {@code false}.
*
* @apiNote
* This method reports on a distinct concept of sealing from
* {@link Package#isSealed() Package::isSealed}.
*
* @return {@code true} if and only if this {@code Class} object represents a sealed class or interface.
*
* @jls 8.1 Class Declarations
4 changes: 4 additions & 0 deletions src/java.base/share/classes/java/lang/Package.java
Original file line number Diff line number Diff line change
@@ -223,6 +223,10 @@ public String getImplementationVendor() {
/**
* Returns true if this package is sealed.
*
* @apiNote
* This method reports on a distinct concept of sealing from
* {@link Class#isSealed() Class::isSealed}.
*
* @return true if the package is sealed, false otherwise
*/
public boolean isSealed() {
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

package com.sun.source.tree;

import java.util.List;

/**
* {@preview Associated with pattern matching for instanceof, a preview feature of
* the Java language.
*
* This interface is associated with <i>pattern matching for instanceof</i>, a preview
* feature of the Java language. Preview features
* may be removed in a future release, or upgraded to permanent
* features of the Java language.}
*
* A deconstruction pattern tree
*
* @since 15
*/
public interface DeconstructionPatternTree extends PatternTree {

/**
* Returns the deconstructed type.
* @return the deconstructed type
*/
Tree getDeconstructor();

/**
* Returns the nested patterns.
* @return the nested patterns.
*/
List<? extends PatternTree> getNestedPatterns();

}

15 changes: 15 additions & 0 deletions src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java
Original file line number Diff line number Diff line change
@@ -234,6 +234,21 @@ public enum Kind {
*/
BINDING_PATTERN(BindingPatternTree.class),

/**
* {@preview Associated with pattern matching for instanceof, a preview feature of
* the Java language.
*
* This enum constant is associated with <i>pattern matching for instanceof</i>, a preview
* feature of the Java language. Preview features
* may be removed in a future release, or upgraded to permanent
* features of the Java language.}
*
* Used for instances of {@link DeconstructionPatternTree}.
*
* @since 15
*/
DECONSTRUCTION_PATTERN(DeconstructionPatternTree.class),

/**
* Used for instances of {@link PrimitiveTypeTree}.
*/
Original file line number Diff line number Diff line change
@@ -274,6 +274,23 @@ public interface TreeVisitor<R,P> {
*/
R visitBindingPattern(BindingPatternTree node, P p);

/**
* {@preview Associated with pattern matching for instanceof, a preview feature of
* the Java language.
*
* This method is associated with <i>pattern matching for instanceof</i>, a preview
* feature of the Java language. Preview features
* may be removed in a future release, or upgraded to permanent
* features of the Java language.}
*
* Visits an DeconstructionPatternTree node.
* @param node the node being visited
* @param p a parameter value
* @return a result value
* @since 15
*/
R visitDeconstructionPattern(DeconstructionPatternTree node, P p);

/**
* Visits a MethodTree node.
* @param node the node being visited
Original file line number Diff line number Diff line change
@@ -564,6 +564,19 @@ public R visitBindingPattern(BindingPatternTree node, P p) {
return defaultAction(node, p);
}

/**
* {@inheritDoc} This implementation calls {@code defaultAction}.
*
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of {@code defaultAction}
* @since 15
*/
@Override
public R visitDeconstructionPattern(DeconstructionPatternTree node, P p) {
return defaultAction(node, p);
}

/**
* {@inheritDoc} This implementation calls {@code defaultAction}.
*
Original file line number Diff line number Diff line change
@@ -694,6 +694,20 @@ public R visitBindingPattern(BindingPatternTree node, P p) {
return scan(node.getType(), p);
}

/**
* {@inheritDoc} This implementation scans the children in left to right order.
*
* @param node {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of scanning
* @since 15
*/
@Override
public R visitDeconstructionPattern(DeconstructionPatternTree node, P p) {
R r = scan(node.getDeconstructor(), p);
return scanAndReduce(node.getNestedPatterns(), p, r);
}

/**
* {@inheritDoc} This implementation scans the children in left to right order.
*
Original file line number Diff line number Diff line change
@@ -166,6 +166,7 @@ public boolean isEnabled() {
*/
public boolean isPreview(Feature feature) {
if (feature == Feature.PATTERN_MATCHING_IN_INSTANCEOF ||
feature == Feature.DECONSTRUCTION_PATTERNS ||
feature == Feature.REIFIABLE_TYPES_INSTANCEOF ||
feature == Feature.RECORDS ||
feature == Feature.SEALED_CLASSES)
Original file line number Diff line number Diff line change
@@ -218,6 +218,9 @@ public enum Feature {
REIFIABLE_TYPES_INSTANCEOF(JDK16, Fragments.FeatureReifiableTypesInstanceof, DiagKind.PLURAL),
RECORDS(JDK16, Fragments.FeatureRecords, DiagKind.PLURAL),
SEALED_CLASSES(JDK16, Fragments.FeatureSealedClasses, DiagKind.PLURAL),
LAMBDA_PARAMETER_SHADOWING(JDK16),
UNDERSCORE_AS_PARAM_NAME(JDK16),
DECONSTRUCTION_PATTERNS(JDK16, Fragments.FeatureDeconstructionPatterns, DiagKind.PLURAL),
;

enum DiagKind {
Original file line number Diff line number Diff line change
@@ -155,6 +155,14 @@ public static Symtab instance(Context context) {
/** The builtin type of all methods. */
public final ClassSymbol methodClass;

/** A common method type for all those method symbols owning a lambda scope.
*/
public final MethodType lambdaScopeMethodType;

/** A common method type for all those method symbols owning a block scope.
*/
public final MethodType blockScopeMethodType;

/** A symbol for the java.base module.
*/
public final ModuleSymbol java_base;
@@ -479,6 +487,9 @@ public <R, P> R accept(ElementVisitor<R, P> v, P p) {
methodClass = new ClassSymbol(PUBLIC|ACYCLIC, names.Method, noSymbol);
methodClass.members_field = new Scope.ErrorScope(boundClass);

lambdaScopeMethodType = new MethodType(List.nil(), voidType, List.nil(), methodClass);
blockScopeMethodType = new MethodType(List.nil(), voidType, List.nil(), methodClass);

// Create class to hold all predefined constants and operations.
predefClass = new ClassSymbol(PUBLIC|ACYCLIC, names.empty, rootPackage);
WriteableScope scope = WriteableScope.create(predefClass);
Loading