diff options
Diffstat (limited to 'sources/scalac/symtab/Definitions.java')
-rw-r--r-- | sources/scalac/symtab/Definitions.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/scalac/symtab/Definitions.java b/sources/scalac/symtab/Definitions.java index 09d996915b..0fa7c88e25 100644 --- a/sources/scalac/symtab/Definitions.java +++ b/sources/scalac/symtab/Definitions.java @@ -620,11 +620,11 @@ public class Definitions { public Symbol getModule(Name fullname, boolean fail) { Scope scope = ROOT_CLASS.members(); int i = 0; - int j = fullname.pos((byte)'.', i); - while (j < fullname.length()) { + int j = fullname.indexOf('.', i); + while (j >= 0) { scope = scope.lookup(fullname.subName(i, j)).members(); i = j + 1; - j = fullname.pos((byte)'.', i); + j = fullname.indexOf('.', i); } Symbol sym = scope.lookup(fullname.subName(i, fullname.length())); if (!sym.isModule()) { @@ -648,11 +648,11 @@ public class Definitions { public Symbol getClass(Name fullname) { Scope scope = ROOT_CLASS.members(); int i = 0; - int j = fullname.pos((byte)'.', i); - while (j < fullname.length()) { + int j = fullname.indexOf('.', i); + while (j >= 0) { scope = scope.lookup(fullname.subName(i, j)).members(); i = j + 1; - j = fullname.pos((byte)'.', i); + j = fullname.indexOf('.', i); } Symbol sym = scope.lookup(fullname.subName(i, fullname.length()).toTypeName()); assert sym.kind != Kinds.NONE : "no class '" + fullname + "'"; |