compiler-errors
Xcode 4.5.2 errors are found but Build is marked as Succeeded
Cleaning, closing, restarting – none worked for me. A simple touch/edit to the pch file in question resolved the issue.
Error compiling in IntelliJ IDEA: “No MessageCollector”
Promoting the answer in the comments to an answer, because it’s the actual answer: This appears to be a bug in the IntelliJ Kotlin plugin v1.2.40 and how it interacts with Java 10. See here. The solution is to upgrade to v1.2.41. (Don’t switch your project to building with Gradle like the other answer suggests … Read more
Xcode errors disappear
Seems to be an Xcode bug, what helps me is to uncheck the Show Live Issues option. Xcode 14.2: Xcode > Preferences > General or ⌘, > General Xcode 14.3.1: Xcode > Settings > General or ⌘, > General
Cast null value to a type
According to the documentation (Explicit conversions) you can cast from a base type to a derived type. Since null is a valid value for all reference types, as long as the cast route exists you should be fine. object null → TestClass null works as object is a superclass to all reference types. However, if … Read more
Method in the type Map is not applicable
? extends Object You are using generic wildcard. You cannot perform add operation as class type is not determinate. You cannot add/put anything(except null). For more details on using wildcard you can refer oracle docs. Collection<?> c = new ArrayList<String>(); c.add(new Object()); // Compile time error Since we don’t know what the element type of … Read more
Java ternary operator influence on generics type inference
Compiles for me fine in java 8. Earlier versions of Java might need more help return retval == null ? Collections.<String>emptyList() : retval; should work. EDIT This is due to improvements in Java 8 type inference as explained here http://openjdk.java.net/jeps/101 And here’s a blog with the highlights: http://blog.jooq.org/2013/11/25/a-lesser-known-java-8-feature-generalized-target-type-inference/
Package conflicts with automatic modules in Java 9
Am I using the new module system correctly? Yes. What you are seeing is intended behavior, and this is because JPMS modules do not allow split packages. In case you are not familiar with the term “split packages” it essentially means two members of the same package coming from two different modules. For example: com.foo.A … Read more
Why does march=native not work on Apple M1?
In Apple clang version 13.0.0, -mcpu=apple-m1 is now available.