Comments (16)
from kotlin-koans.
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.
I tried that but then it complains that TODO is an unresolved reference 😄
from kotlin-koans.
Hmm. I'm not seeing that. Try my fork. I just pushed it. https://github.com/hhariri/workshop-jb
from kotlin-koans.
Yup pulled yours and this time built the whole project from root and all is fine :)
from kotlin-koans.
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.
Just remove the "infix" is enough.
from kotlin-koans.
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.
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.
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.
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.
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.
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.
@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.
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.
I guess this issue should be marked as fixed because more than one issue is resolved here already
from kotlin-koans.
Related Issues (20)
- Html builder(todoTask39) link to documentation HOT 1
- N25ComparisonKtTest not testing proper comaprison
- Shows tasks compilation errors, when it's not HOT 1
- Compilation Failed HOT 15
- ./gradlew test - ArrayIndexOutOfBoundsException: 450 HOT 1
- Conventions : For loop - task fails to run on https://try.kotlinlang.org HOT 2
- Task 21: Partition Task
- Not quite perfect answer in "Object expressions" and "SAM conversions" online koans
- Missing iii_conventions/_29_Tips.kt?
- Debug Breakpoints
- Upgrade to latest Gradle release version HOT 2
- Unable to save plugin settings (Android Studio 3.1.4) HOT 1
- Task 32 java.lang.NoSuchMethodError: when we have Int property
- [online] Kotlin Koans 5/42 contains incorrect assertion
- Bug in Collections/Compound tasks? HOT 10
- commenting.
- Build via Gradle Kotlin DSL
- Migrate to JUnit 5 HOT 1
- Use plugins edutools HOT 4
- Android apk
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-koans.