--- /opt/cvs/dotgnu/pnet/codegen/cg_gen.h Thu Feb 27 19:53:52 2003 +++ codegen/cg_gen.h Fri May 2 23:51:24 2003 @@ -103,6 +103,7 @@ int semAnalysis : 1; /* Non-zero during semantic analysis */ int typeGather : 1; /* Non-zero during type gathering */ int inSemType : 1; /* Semantic analysis on a type */ + int inAttrArg : 1; /* Non-zero inside an attribute arg */ int useJavaLib : 1; /* Use Java and not C# library */ int outputIsJava : 1; /* Output Java bytecode */ int debugFlag : 1; /* Non-zero if debug is enabled */ --- /opt/cvs/dotgnu/pnet/cscc/csharp/cs_oper.tc Sun Mar 9 13:54:28 2003 +++ cscc/csharp/cs_oper.tc Fri May 2 23:56:54 2003 @@ -1384,6 +1384,8 @@ CSSemValue value; ILNode_TypeOf *typeofNode; + info->inAttrArg=1; + /* Special case: types can be used as attribute constants */ if(yyisa(node->expr, ILNode_TypeOf)) { @@ -1439,6 +1441,8 @@ } } + info->inAttrArg=0; + /* Return the semantic information to the caller */ return value; } --- /opt/cvs/dotgnu/pnet/cscc/csharp/cs_lookup.c Fri May 2 11:52:08 2003 +++ cscc/csharp/cs_lookup.c Sat May 3 00:21:48 2003 @@ -1217,7 +1217,9 @@ accessedFrom = ILClassResolve(CSGetAccessScope(genInfo, 1)); /* Scan the start type and its nested parents */ - while(startType != 0) + /* Note: do not lookup class members while resolving the simple names + * inside an attribute argument */ + while(startType != 0 && !genInfo->inAttrArg) { /* Resolve cross-image references */ startType = ILClassResolve(startType);