This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Comparator<T> { | |
| boolean lt(T left, T right); | |
| } | |
| static Object NULL = new Object(); | |
| static class LtInf implements Comparator<Object> { | |
| @Override | |
| public boolean lt(Object left, Object right) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.io.StreamTokenizer; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; | |
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: smevok | |
| * Date: 05.07.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ModuleConfiguration moduleConfiguration = new ModuleConfiguration() { | |
| @Override | |
| public void addDefaultImports(@NotNull Collection<JetImportDirective> directives) { | |
| for (ImportPath defaultJetImport : DefaultModuleConfiguration.DEFAULT_JET_IMPORTS) { | |
| directives.add(JetPsiFactory.createImportDirective(project, defaultJetImport)); | |
| } | |
| } | |
| @Override | |
| public void extendNamespaceScope( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A(val b : B, val c : C) {...} | |
| fun test() { | |
| val a = A( | |
| b = B(), | |
| c = C() | |
| ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void compareNamespaces(@NotNull NamespaceDescriptor nsa, @NotNull NamespaceDescriptor nsb, boolean includeObject, | |
| @NotNull File txtFile) { | |
| String serialized = new NamespaceComparator(includeObject).doCompareNamespaces(nsa, nsb); | |
| try { | |
| if (!txtFile.exists()) { | |
| FileUtil.writeToFile(txtFile, serialized); | |
| Assert.fail("Expected data file did not exist. Generating: " + txtFile); | |
| } | |
| String expected = FileUtil.loadFile(txtFile); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hhh.csp | |
| import org.junit.* | |
| import org.junit.rules.ExpectedException | |
| import junit.framework.TestCase | |
| import junit.framework.TestSuite | |
| public class IntervalTest(name :String) : TestCase(name) { | |
| fun testIntervalPlus() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args : Array<String>) { | |
| println("Hello, GitHub!") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun assert(i : Int) = println(i) | |
| fun abstract(i : Int) = println(i) | |
| fun boolean(i : Int) = println(i) | |
| fun `break`(i : Int) = println(i) | |
| fun byte(i : Int) = println(i) | |
| fun case(i : Int) = println(i) | |
| fun catch(i : Int) = println(i) | |
| fun char(i : Int) = println(i) | |
| fun `class`(i : Int) = println(i) | |
| fun const(i : Int) = println(i) |
NewerOlder