diff options
author | paltherr <paltherr@epfl.ch> | 2004-01-13 13:32:24 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-01-13 13:32:24 +0000 |
commit | 4a9bfff8fb04c9b486dd5611862f9a0f3c996b88 (patch) | |
tree | 821e81df4b4f99dc4f8c45b2166dfec0ecfe10a8 /sources/scalac/symtab/Definitions.java | |
parent | fbbe896c2c32dd0e460faddba273631dd92a03a4 (diff) | |
download | scala-4a9bfff8fb04c9b486dd5611862f9a0f3c996b88.tar.gz scala-4a9bfff8fb04c9b486dd5611862f9a0f3c996b88.tar.bz2 scala-4a9bfff8fb04c9b486dd5611862f9a0f3c996b88.zip |
- Added ANYREF_SYNCHRONIZED
Diffstat (limited to 'sources/scalac/symtab/Definitions.java')
-rw-r--r-- | sources/scalac/symtab/Definitions.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Definitions.java b/sources/scalac/symtab/Definitions.java index 8c59358a5e..a1270d7c30 100644 --- a/sources/scalac/symtab/Definitions.java +++ b/sources/scalac/symtab/Definitions.java @@ -235,6 +235,9 @@ public class Definitions { public final Symbol ANY_AS; public final Symbol ANY_MATCH; + /** Some scala.AnyRef methods */ + public final Symbol ANYREF_SYNCHRONIZED; + //######################################################################## // Public Fields & Methods - Java class methods @@ -572,6 +575,21 @@ public class Definitions { ANY_MATCH_VPARAMS, ANY_MATCH_TPARAMS[1].type()))); + // add members to scala.AnyREF + ANYREF_SYNCHRONIZED = + newTerm(ANYREF_CLASS, Names.synchronized_, Modifiers.FINAL); + + Symbol ANYREF_SYNCHRONIZED_TPARAM = + newTParam(ANYREF_SYNCHRONIZED,0,ANY_TYPE()); + Symbol ANYREF_SYNCHRONIZED_VPARAM = + newVParam(ANYREF_SYNCHRONIZED,0,ANYREF_SYNCHRONIZED_TPARAM.type()); + ANYREF_SYNCHRONIZED.setInfo( + Type.PolyType( + new Symbol[] {ANYREF_SYNCHRONIZED_TPARAM}, + Type.MethodType( + new Symbol[] {ANYREF_SYNCHRONIZED_VPARAM}, + ANYREF_SYNCHRONIZED_TPARAM.type()))); + // add members to java.lang.String JAVA_STRING_PLUS = newTerm(JAVA_STRING_CLASS, Names.PLUS, Modifiers.FINAL); @@ -656,6 +674,8 @@ public class Definitions { /** Creates a new term */ private Symbol newTerm(Symbol owner, Name name, int flags) { + if (owner.isTypeAlias()) owner = owner.type().unalias().symbol(); + assert owner.isClassType(): Debug.show(owner) + " -- " + name; Symbol method = new TermSymbol(Position.NOPOS, name, owner, flags); if (owner != Symbol.NONE) owner.members().enterOrOverload(method); return method; |