Code Monkey home page Code Monkey logo

Comments (4)

drslump avatar drslump commented on June 9, 2024

It's a bug on the compiler, to detect cycles it checks if it has already visited a given base type as part of any inheritance path for the type being checked (Steps/Inheritance/BaseTypeResolution.cs). The fix is probably trivial, I'll play with it later on.

Two work arounds I can think of, the easier one is obviously to avoid the intermediate interfaces and just define the class like:

class ExhaustedCondition(ICondition, IAffectsStrength, IAffectsDexterity):

The second will keep the semantics of the original code but it requires separating in different assemblies the interface definitions from the type implementing them. This works because the compiler handles differently types defined in a compilation unit (internal) from those already compiled (reflected).

from boo.

BitPuffin avatar BitPuffin commented on June 9, 2024

Hi, yeah the reason I created the intermediate interface is so that I could have a list of objects that conform to the those interfaces. And as far as I know at least you can't do:

something as (IFoo, IBar)

Or can you?

Either way, my current workaround was to just remove ICondition completely and just put the method in all of the interfaces. Which isn't all too elegant but it works to achieve what I wanted.

Unrelated, but does anyone by any chance know how often Unity updates the boo version? So that I know roughly when the fix will be in Unity so that I can clean up the workaround.

Cheers! :)

from boo.

drslump avatar drslump commented on June 9, 2024

I'm afraid you can't express types that way, although it does actually look nice 🍺

As far as I know Unity uses their own fork of Boo instead of official releases. Perhaps you can point them to the fix and they can apply it to their fork.

from boo.

BitPuffin avatar BitPuffin commented on June 9, 2024

Ah so your commit fixed the bug? :)

If so I'll post an issue on their fork as well

from boo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.