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

 
 

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

bug #11519: problems on using "using"

Submitted by:  wolfgang haefelinger <oraetlabora>
Submitted on:  Fri 07 Jan 2005 02:04:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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>
Project 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>

 

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
  • -unavailable- added by ktreichel (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 01 Mar 2005 12:36:30 PM UTCdrobossonAttached File-=>Added whee.cs, #2250
    Fri 07 Jan 2005 02:04:05 PM UTCoraetlaboraAttached File-=>Added demo.tgz, #2036

    Back to the top


    Powered by Savane 3.1-cleanup