-
Notifications
You must be signed in to change notification settings - Fork 855
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinstanting the smartType handling for static members, to aid code c…
…ompletion over non-sealed types.
- Loading branch information
Showing
10 changed files
with
103 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...s/org/netbeans/modules/java/completion/JavaCompletionTaskTest/17/nonSealedTypeSwitch.pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
null | ||
public static final EJ EJ.A | ||
public static final EJ EJ.B | ||
public static final EJ EJ.C | ||
CI | ||
CJ1 | ||
CJ2 | ||
EJ | ||
I | ||
J | ||
Test | ||
com | ||
java | ||
javax | ||
org | ||
sun |
38 changes: 38 additions & 0 deletions
38
...ion/test/unit/data/org/netbeans/modules/java/completion/data/SwitchWithNonSealedType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package test; | ||
|
||
public class Test { | ||
|
||
interface I {} | ||
interface J extends I {} | ||
final class CI implements I {} | ||
final class CJ1 implements J {} | ||
final enum EJ implements J {A, B, C} | ||
|
||
public void op(I i) { | ||
switch (i) { | ||
case | ||
|
||
} | ||
} | ||
} | ||
|
||
final class CJ2 implements Test.J {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.