consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
103 stars 10 forks source link

Consulo mark internal generic class as an error but it's not #65

Closed rogeratplumbee closed 8 years ago

rogeratplumbee commented 8 years ago

I'm using this state machine library:

https://github.com/dotnet-state-machine/stateless

The class:

public class StateMachine<TState, TTrigger>

has an internal public class:

public class Transition<TState, TTrigger>

I'm creating this code:

bootstrap = new StateMachine<string, string>("Started");

        bootstrap.Configure("Started")
        .OnEntry(OnEntryState)
        .Permit("LoadMath", "LoadingMathModel");

And the the OnEntryState:

void OnEntryState(StateMachine<string, string>.Transition transition) {
        Debug.Log("Trigger " + transition.Trigger + " Transition from " + transition.Source + " to " + transition.Destination);

    }

Consulo mark the type of the parameter as an error:

StateMachine<string, string>.Transition

but the code is correct, compile and do the expected job.

screen shot 2016-03-17 at 11 06 36

If I change the signature to this:

void OnEntryState(StateMachine<string, string>.Transition<string, string> transition) {
        Debug.Log("Trigger " + transition.Trigger + " Transition from " + transition.Source + " to " + transition.Destination);

    }

The error disappear in Consulo but the code is incorrect and doesn't compile.

VISTALL commented 8 years ago

Hi. I think it was fixed (see this report https://github.com/consulo/consulo-csharp/issues/372).

Can you say C# plugin version?

I think you need only call About -> Check for updates

rogeratplumbee commented 8 years ago

I just updated Consulo to the latest build and is fixed, yes. Apologies! PD You're so quick fixing bugs that you fix them before I finished typing :D

VISTALL commented 8 years ago

Please report any other code issues or features. Most C# problems you can report here https://github.com/consulo/consulo-csharp

Thanks