summaryrefslogtreecommitdiff
path: root/sources/scalac/ast
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-30 12:49:30 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-30 12:49:30 +0000
commitfb814bd99236d100b74978cb357ab42ffb2c79a8 (patch)
treecf3b66e1cc0913d4779dcecc9dd1828d92f6961c /sources/scalac/ast
parent4d69afd9eb473beecd39afa4f399a21724667776 (diff)
downloadscala-fb814bd99236d100b74978cb357ab42ffb2c79a8.tar.gz
scala-fb814bd99236d100b74978cb357ab42ffb2c79a8.tar.bz2
scala-fb814bd99236d100b74978cb357ab42ffb2c79a8.zip
- Normalized member names of class Definition
- Cleaned code of Definition
Diffstat (limited to 'sources/scalac/ast')
-rw-r--r--sources/scalac/ast/TreeGen.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 43e33ad80e..ebb6f29a61 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -594,7 +594,8 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
/** Builds an instance test with given value and type. */
public Tree mkIsInstanceOf(int pos, Tree value, Type type) {
- return mkApplyT_(pos, Select(value, definitions.IS), new Type[]{type});
+ Type[] targs = new Type[]{type};
+ return mkApplyT_(pos, Select(value, definitions.ANY_IS), targs);
}
public Tree mkIsInstanceOf(Tree value, Type type) {
return mkIsInstanceOf(value.pos, value, type);
@@ -602,7 +603,8 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
/** Builds a cast with given value and type. */
public Tree mkAsInstanceOf(int pos, Tree value, Type type) {
- return mkApplyT_(pos, Select(value, definitions.AS), new Type[]{type});
+ Type[] targs = new Type[]{type};
+ return mkApplyT_(pos, Select(value, definitions.ANY_AS), targs);
}
public Tree mkAsInstanceOf(Tree value, Type type) {
return mkAsInstanceOf(value.pos, value, type);
@@ -1018,7 +1020,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
}
Type[] parentTypes = {
definitions.OBJECT_TYPE(),
- definitions.functionType(argtypes, restype) };
+ definitions.FUNCTION_TYPE(argtypes, restype) };
ClassSymbol clazz = new ClassSymbol(
pos, Names.ANON_CLASS_NAME.toTypeName(), owner, 0);
clazz.setInfo(Type.compoundType(parentTypes, new Scope(), clazz));
@@ -1049,7 +1051,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
pos, Names.ANON_CLASS_NAME.toTypeName(), owner, 0);
Type[] parentTypes = {
definitions.OBJECT_TYPE(),
- definitions.partialFunctionType(pattype, restype)};
+ definitions.PARTIALFUNCTION_TYPE(pattype, restype)};
clazz.setInfo(Type.compoundType(parentTypes, new Scope(), clazz));
clazz.allConstructors().setInfo(
Type.MethodType(Symbol.EMPTY_ARRAY, clazz.typeConstructor()));
@@ -1077,7 +1079,7 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
changeOwner(visitor, prevOwner, meth);
Tree body =
mkApplyTV(
- Select(Ident(pos, param), definitions.MATCH),
+ Select(Ident(pos, param), definitions.ANY_MATCH),
new Tree[]{mkType(pos, pattype), mkType(pos, restype)},
new Tree[]{visitor});
return DefDef(meth, body);