GithubHelp home page GithubHelp logo

Comments (16)

jchannon avatar jchannon commented on June 8, 2024

screen shot 2015-10-11 at 19 45 45

screen shot 2015-10-11 at 19 45 23

from kotlin-koans.

hhariri avatar hhariri commented on June 8, 2024

Change:

fun infixNotation() {
    infix fun Int.foo(s: String) = "$s$this"

    1 foo "abc"
    // the same as:
    1.foo("abc")
}

to

fun infixNotation() {
    fun Int.foo(s: String) = "$s$this"

    1 foo "abc"
    // the same as:
    1.foo("abc")
}

i.e. remove infix. It should build.

from kotlin-koans.

jchannon avatar jchannon commented on June 8, 2024

I tried that but then it complains that TODO is an unresolved reference 😄

from kotlin-koans.

hhariri avatar hhariri commented on June 8, 2024

Hmm. I'm not seeing that. Try my fork. I just pushed it. https://github.com/hhariri/workshop-jb

from kotlin-koans.

jchannon avatar jchannon commented on June 8, 2024

Yup pulled yours and this time built the whole project from root and all is fine :)

from kotlin-koans.

Onizuka89 avatar Onizuka89 commented on June 8, 2024

They were a bit too eager with the infix keyword I think. It's supposed to be added later as I understood it. I'm guessing it will be in M15.

It's kind of weird that you needed to pull hhariri's fork for it to work for you, even though the fix he suggested should have been enough :/

from kotlin-koans.

shuoli84 avatar shuoli84 commented on June 8, 2024

Just remove the "infix" is enough.

from kotlin-koans.

jchannon avatar jchannon commented on June 8, 2024

It is, not sure why it didnt work when i said compile the kt file and then worked when it compiled the whole project

from kotlin-koans.

Ghedeon avatar Ghedeon commented on June 8, 2024

This, as well as many other compile errors:

workshop-jb/src/i_introduction/_5_Nullable_Types/NullableTypes.kt
Error:(23, 15) Kotlin: Function invocation 'size()' expected 
workshop-jb/src/i_introduction/_8_Extension_Functions/ExtensionFunctions.kt
Error:(6, 35) Kotlin: Function invocation 'length()' expected
workshop-jb/src/iii_properties/_21_HowDelegatesWork.kt
Error:(29, 1) Kotlin: Class 'EffectiveDate' must be declared abstract or implement abstract member public abstract fun get(thisRef: R, property: kotlin.PropertyMetadata): ii_conventions.MyDate defined in kotlin.properties.ReadWriteProperty

etc...

from kotlin-koans.

RomanBelkov avatar RomanBelkov commented on June 8, 2024

My best guess that it's because of latest commit to workshop.

As written in there, workshop is migrating to Kotlin 1.0 beta(?). Try building workshop at 9d61fb3 commit and read the comments written above -- this should help

from kotlin-koans.

Ghedeon avatar Ghedeon commented on June 8, 2024

Looks like the whole notion of master branch is lost here. I mean, it's master, it MUST compile! Two days ago it was almost alright, only one compilation error. And now it's ~200 errors again (I'm looking at you @svtk )). I just hope that these guys are more organized internally, otherwise we're all fucked). Yes, it's experimental, we probably shouldn't expect a lot of consistency, but I believe that working master, usage of tags, feature branches for experiments and README updates with compilation hints will help a lot... Btw, does anybody know some working Scala koans?)

from kotlin-koans.

RomanBelkov avatar RomanBelkov commented on June 8, 2024

Wow, @Ghedeon , quite a speech you gave. But have you tried updating your plugin?

You can update your plugin for, like, two days already, so this should solve the issue with compilation.

It is very hard to focus on everything, and everybody makes mistakes. All in all, JB gave us a pretty workshop to start with and the community is here to point out and try to fix the mistakes.

from kotlin-koans.

Ghedeon avatar Ghedeon commented on June 8, 2024

You're right, sorry for jumping my seat too fast. The thing is that I'm a big fan of JB products and Kotlin in particular and it hits me every time when I'm trying to convince my team members or other people to give it a try and they have a good argument to criticize instead. Especially when I know they're right. So, let's disarm them all!)

Back to our sheep. Yes, I updated plugin two days ago and it was quite good (one compilation error), up to 976a96c. Now it's a mess again. My wild guess is that it probably compiles against another plugin build, just not yet available via plugin repo.

from kotlin-koans.

yole avatar yole commented on June 8, 2024

@Ghedeon which version of Kotlin are you using, and are you sure you don't have any local changes?? I just verified that the latest commit in master (4ce23e2) compiles without any errors with Kotlin 1.0 Beta Candidate (1.0.0-Beta-1038).

from kotlin-koans.

Ghedeon avatar Ghedeon commented on June 8, 2024

Not changes, but more like IDE cache. Didn't restart IDE for a while, it compiles now after performing Invalidate Caches/Restart... My apologies.

from kotlin-koans.

RomanBelkov avatar RomanBelkov commented on June 8, 2024

I guess this issue should be marked as fixed because more than one issue is resolved here already

from kotlin-koans.

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.