add 'isSafe' to FqNameUnsafe
This commit is contained in:
@@ -62,7 +62,7 @@ public class FqName extends FqNameBase {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isValidAfterUnsafeCheck(@NotNull String qualifiedName) {
|
||||
/*package*/ static boolean isValidAfterUnsafeCheck(@NotNull String qualifiedName) {
|
||||
// TODO: There's a valid name with escape char ``
|
||||
return qualifiedName.indexOf('<') < 0;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,13 @@ public class FqNameUnsafe extends FqNameBase {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
public boolean isSafe() {
|
||||
if (safe != null) {
|
||||
return true;
|
||||
}
|
||||
return FqName.isValidAfterUnsafeCheck(getFqName());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public FqName toSafe() {
|
||||
if (safe != null) {
|
||||
|
||||
Reference in New Issue
Block a user