-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathFontImpl.java
More file actions
34 lines (26 loc) · 1.05 KB
/
FontImpl.java
File metadata and controls
34 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Note: PICO defaults the class decal to RDM. Removing errors on line 26 and 30.
import qual.*;
@Immutable interface SColor {
}
@Immutable abstract class AbstractColorAdv implements SColor {
}
// ::error: (type.invalid.annotations.on.use)
class FI_ColorImpl extends AbstractColorAdv {
// Arguably it would be preferable for this to not be an error.
// ::error: (type.invalid.annotations.on.use)
public static final AbstractColorAdv BLACK = new FI_ColorImpl("#000000");
// PICO Note: adding this error.
// ::error: (super.invocation.invalid)
FI_ColorImpl(String fontColor) {
}
}
public class FontImpl {
FontImpl(String fontColor) {
// Arguably it would be preferable for this to not be an error.
// Removing error. PICO chose the preferable path.
SColor a = new FI_ColorImpl(fontColor);
// Arguably it would be preferable for this to not be an error either.
// Removing error. PICO chose the preferable path.
SColor c = fontColor != null ? new FI_ColorImpl(fontColor) : null;
}
}