'this' cannot be an interface itself, no this and no interfaces

Developer
Jun 23, 2012 at 6:26 PM

Error 8 'this' type cannot be an interface itself.   at System.RuntimeTypeHandle.VerifyInterfaceIsImplemented(RuntimeTypeHandle handle, RuntimeTypeHandle interfaceHandle)   at System.RuntimeType.GetInterfaceMap(Type ifaceType)   at Cosmos.IL2CPU.ILScanner.ScanType(Type aType) in c:\Users\Henry\Documents\Cosmos Sources\cosmos-88457\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 946   at Cosmos.IL2CPU.ILScanner.ScanQueue() in c:\Users\Henry\Documents\Cosmos Sources\cosmos-88457\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 974   at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Users\Henry\Documents\Cosmos Sources\cosmos-88457\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 322   at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Users\Henry\Documents\Cosmos Sources\cosmos-88457\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 231 C:\Program Files\MSBuild\Cosmos\Cosmos.targets 32 10 FuryOSBoot

 

I have found the code that must be causing it and removed all the "this" statements but it still refuses to build.

Developer
Jun 23, 2012 at 7:41 PM

Addendum: the source is at furyos.codeplex.com

Jun 23, 2012 at 7:59 PM

"the code that must be causing it" is your entire source code base?

Developer
Jun 23, 2012 at 8:29 PM

DSharp.Program or anything coming off that recursively.

Jun 23, 2012 at 10:13 PM

Line 10 of your http://furyos.codeplex.com/SourceControl/changeset/view/14851#286409 Program class is an enum.

Are enums supported?

The last line of the error has a 10 in it, dunno if that is a coincidence.

 

Posting a link or the code would be more helpful, no-one wants to go roam through some random repository.

Developer
Jun 24, 2012 at 9:10 AM
Edited Jun 24, 2012 at 9:12 AM

As far as I know they are and they have worked before but I'll remove it and see if it fixes anything, it didn't. The line 32 10 bit is in the MSBuild of Cosmos.Targets...

Developer
Jun 25, 2012 at 9:58 AM

Enums are definitely supported. I use them all the time in my OS and I know that Pear uses them too.

Developer
Jun 25, 2012 at 6:36 PM

Sorted that error by removing a string.Replace(string,string); method.

Coordinator
Jun 25, 2012 at 10:42 PM

You're using interfaces. Interfaces are basically unsupported..

Op 25 jun. 2012 22:16 schreef "melikesPCcheese" <notifications@codeplex.com> het volgende:

From: melikesPCcheese

Sorted that error by removing a string.Replace(string,string); method.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Developer
Jun 26, 2012 at 6:53 AM
Why can't the debug error tell you which line of code caused it because it would save a load of hassle.

Sent from my Windows Phone

From: mterwoord
Sent: 25/06/2012 22:43
To: keyboardhenry7@hotmail.co.uk
Subject: Re: 'this' cannot be an interface itself, no this and no interfaces [Cosmos:360690]

From: mterwoord

You're using interfaces. Interfaces are basically unsupported..

Op 25 jun. 2012 22:16 schreef "melikesPCcheese" <notifications@codeplex.com> het volgende:

From: melikesPCcheese

Sorted that error by removing a string.Replace(string,string); method.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Jun 26, 2012 at 8:31 AM
Because that would mean that the complete compiler would need to keep extra info, and that would slow down the compiler. My guess: are you using foreach?


On Tue, Jun 26, 2012 at 7:54 AM, melikesPCcheese <notifications@codeplex.com> wrote:

From: melikesPCcheese

Why can't the debug error tell you which line of code caused it because it would save a load of hassle.

Sent from my Windows Phone

From: mterwoord
Sent: 25/06/2012 22:43
To: keyboardhenry7@hotmail.co.uk
Subject: Re: 'this' cannot be an interface itself, no this and no interfaces [Cosmos:360690]

From: mterwoord

You're using interfaces. Interfaces are basically unsupported..

Op 25 jun. 2012 22:16 schreef "melikesPCcheese" <notifications@codeplex.com> het volgende:

From: melikesPCcheese

Sorted that error by removing a string.Replace(string,string); method.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Jun 26, 2012 at 3:49 PM
Nope it was private keywords and removing a string.replace that sorted it.

Sent from my Windows Phone

From: mterwoord
Sent: 26/06/2012 08:31
To: keyboardhenry7@hotmail.co.uk
Subject: Re: 'this' cannot be an interface itself, no this and no interfaces [Cosmos:360690]

From: mterwoord

Because that would mean that the complete compiler would need to keep extra info, and that would slow down the compiler. My guess: are you using foreach?


On Tue, Jun 26, 2012 at 7:54 AM, melikesPCcheese <notifications@codeplex.com> wrote:

From: melikesPCcheese

Why can't the debug error tell you which line of code caused it because it would save a load of hassle.

Sent from my Windows Phone

From: mterwoord
Sent: 25/06/2012 22:43
To: keyboardhenry7@hotmail.co.uk
Subject: Re: 'this' cannot be an interface itself, no this and no interfaces [Cosmos:360690]

From: mterwoord

You're using interfaces. Interfaces are basically unsupported..

Op 25 jun. 2012 22:16 schreef "melikesPCcheese" <notifications@codeplex.com> het volgende:

From: melikesPCcheese

Sorted that error by removing a string.Replace(string,string); method.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Jun 26, 2012 at 3:50 PM
On 6/26/2012 10:49 AM, melikesPCcheese wrote:
> Nope it was private keywords and removing a string.replace that sorted it.

private had nothing to do with it.
Developer
Jun 26, 2012 at 3:51 PM
I'm just going on the fact that removing those two got rid of the error.

Sent from my Windows Phone

From: kudzu
Sent: 26/06/2012 15:50
To: keyboardhenry7@hotmail.co.uk
Subject: Re: 'this' cannot be an interface itself, no this and no interfaces [Cosmos:360690]

From: kudzu

On 6/26/2012 10:49 AM, melikesPCcheese wrote:
> Nope it was private keywords and removing a string.replace that sorted it.

private had nothing to do with it.