bugDotGNU Portable.NET - Bugs: bug #11519, problems on using...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11519: problems on using "using"

Submitter:  wolfgang haefelinger <oraetlabora>
Submitted:  Fri 07 Jan 2005 02:04:05 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Sat 26 May 2007 11:36:16 AM UTC, comment #3: 

There has been a fix for this problem in cvs.

Can you check if the problem is solved for you now?

Klaus

Klaus Treichel <ktreichel>
Group administrator
Fri 07 Jan 2005 02:11:57 PM UTC, comment #2: 

There's another thing which makes me a bit perplex: GCJ and also Jikes have kind of similar problems on "import". Could it be that there is a common and untouched code base for all this tools??

wolfgang haefelinger <oraetlabora>
Fri 07 Jan 2005 02:09:45 PM UTC, comment #1: 

I forgot to mention that I can "workaround" the problem when writing

 using antlr;

instead of "using Token = antlr.Token;" - so it appears a problem of "using" and that's why I gave this problem
appropriate title.

wolfgang haefelinger <oraetlabora>
Fri 07 Jan 2005 02:04:05 PM UTC, original submission:  

I browsed for this problem but could not find an entry - however I'm not a C# expert, so please apologize if this problem is trivial or already known:

I have a public class "Token" in namespace "antlr" in file "antlr.cs". In another file "main.cs" I'm using this public class like this:

 using Token = antlr.Token;
 class Main {
   public static void Main(string[] args) {
     Token t0;
   }
 }

This works fine doing all in one shot:
 
 $ cscc /t:exe main.cs antlr.cs

But when building an assembly for antlr.cs and using it, I'm getting strange error messages:

 $ cscc /t:library /out:antlr.dll antlr.cs 
 $ cscc /t:exe main.cs /r:antlr.dll
 main.cs:2: invalid left operand to `.'
 main.cs:8: invalid type specification `Token'

I'm using "cscc version 0.6.10" compiled from scratch on Mandrake 10.

Note: I do not have this problems using Microsoft .NET 1.1 nor do I have this problems using Mono 1.0.5.

I attached demo.tgz containing my *.cs files.




wolfgang haefelinger <oraetlabora>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #2633:  whee.cs added by drobosson (773B - text/x-csharp - Simple working test case for using aliases. Works with CVS build.)
file #2335:  demo.tgz added by oraetlabora (263B - application/x-gzip-compressed - contains demo files antlr.cs and main.cs)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ktreichel (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2005-03-01 drobosson Attached File- Added whee.cs, #2250
    2005-01-07 oraetlabora Attached File- Added demo.tgz, #2036

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code