• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 The JSpecify Authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 import org.jspecify.annotations.NullMarked;
17 import org.jspecify.annotations.Nullable;
18 import org.jspecify.annotations.NullnessUnspecified;
19 
20 @NullMarked
21 class NullLiteralToTypeVariable<
22     Never1T,
23     ChildOfNever1T extends Never1T,
24     UnspecChildOfNever1T extends @NullnessUnspecified Never1T,
25     NullChildOfNever1T extends @Nullable Never1T,
26     //
27     Never2T extends Object,
28     ChildOfNever2T extends Never2T,
29     UnspecChildOfNever2T extends @NullnessUnspecified Never2T,
30     NullChildOfNever2T extends @Nullable Never2T,
31     //
32     UnspecT extends @NullnessUnspecified Object,
33     ChildOfUnspecT extends UnspecT,
34     UnspecChildOfUnspecT extends @NullnessUnspecified UnspecT,
35     NullChildOfUnspecT extends @Nullable UnspecT,
36     //
37     ParametricT extends @Nullable Object,
38     ChildOfParametricT extends ParametricT,
39     UnspecChildOfParametricT extends @NullnessUnspecified ParametricT,
40     NullChildOfParametricT extends @Nullable ParametricT,
41     //
42     UnusedT> {
x0()43   Never1T x0() {
44     // jspecify_nullness_mismatch
45     return null;
46   }
47 
x1()48   ChildOfNever1T x1() {
49     // jspecify_nullness_mismatch
50     return null;
51   }
52 
x2()53   UnspecChildOfNever1T x2() {
54     // jspecify_nullness_mismatch
55     return null;
56   }
57 
x3()58   NullChildOfNever1T x3() {
59     // jspecify_nullness_mismatch
60     return null;
61   }
62 
x4()63   Never2T x4() {
64     // jspecify_nullness_mismatch
65     return null;
66   }
67 
x5()68   ChildOfNever2T x5() {
69     // jspecify_nullness_mismatch
70     return null;
71   }
72 
x6()73   UnspecChildOfNever2T x6() {
74     // jspecify_nullness_mismatch
75     return null;
76   }
77 
x7()78   NullChildOfNever2T x7() {
79     // jspecify_nullness_mismatch
80     return null;
81   }
82 
x8()83   UnspecT x8() {
84     // jspecify_nullness_mismatch
85     return null;
86   }
87 
x9()88   ChildOfUnspecT x9() {
89     // jspecify_nullness_mismatch
90     return null;
91   }
92 
x10()93   UnspecChildOfUnspecT x10() {
94     // jspecify_nullness_mismatch
95     return null;
96   }
97 
x11()98   NullChildOfUnspecT x11() {
99     // jspecify_nullness_mismatch
100     return null;
101   }
102 
x12()103   ParametricT x12() {
104     // jspecify_nullness_mismatch
105     return null;
106   }
107 
x13()108   ChildOfParametricT x13() {
109     // jspecify_nullness_mismatch
110     return null;
111   }
112 
x14()113   UnspecChildOfParametricT x14() {
114     // jspecify_nullness_mismatch
115     return null;
116   }
117 
x15()118   NullChildOfParametricT x15() {
119     // jspecify_nullness_mismatch
120     return null;
121   }
122 }
123