summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2004-10-06 14:15:07 +0000
committermihaylov <mihaylov@epfl.ch>2004-10-06 14:15:07 +0000
commite86b5f81f9346f86055cedd85e144bf794e103fb (patch)
tree85d5271245e351332b698ed03ef03cc16f200355 /sources
parent1c08fd5be700378d0056aea04c66c4d140bf35cd (diff)
downloadscala-e86b5f81f9346f86055cedd85e144bf794e103fb.tar.gz
scala-e86b5f81f9346f86055cedd85e144bf794e103fb.tar.bz2
scala-e86b5f81f9346f86055cedd85e144bf794e103fb.zip
- In Attributed nodes ransform the definition B...
- In Attributed nodes ransform the definition BEFORE using its symbol to map the attributes list
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/scalac/typechecker/Analyzer.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/scala/tools/scalac/typechecker/Analyzer.scala b/sources/scala/tools/scalac/typechecker/Analyzer.scala
index 2bf3d4c4d6..8373a6495b 100644
--- a/sources/scala/tools/scalac/typechecker/Analyzer.scala
+++ b/sources/scala/tools/scalac/typechecker/Analyzer.scala
@@ -2165,7 +2165,6 @@ class Analyzer(global: scalac_Global, descr: AnalyzerPhase) extends Transformer(
/** The main attribution function
*/
override def transform(tree: Tree): Tree = {
-
//System.out.println("transforming " + tree + ":" + pt);//DEBUG
if (tree.getType() != null) {
checkDefined.all = tree; checkDefined.traverse(tree);//debug
@@ -2206,10 +2205,12 @@ class Analyzer(global: scalac_Global, descr: AnalyzerPhase) extends Transformer(
}
val attr1 = transform(attr, CONSTRmode, definitions.ATTRIBUTE_TYPE());
- var attrs = global.mapSymbolAttr.get(sym).asInstanceOf[List[AttrInfo]];
+ val res = transform(definition);
+ val defsym = res.symbol();
+ var attrs = global.mapSymbolAttr.get(defsym).asInstanceOf[List[AttrInfo]];
if (attrs == null) attrs = List();
- global.mapSymbolAttr.put(sym, attrInfo(attr1) :: attrs);
- transform(definition)
+ global.mapSymbolAttr.put(defsym, attrInfo(attr1) :: attrs);
+ res
case Tree.DocDef(comment, definition) =>
transform(definition)