Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/main/java/io/usethesource/vallang/IListWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
*/
public interface IListWriter extends IWriter<IList> {

@Override
public default IListWriter unique() {
return (IListWriter) IWriter.super.unique();
}

/**
* Inserts elements at a specific position, keeping the argument in order of appearance.
*
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/io/usethesource/vallang/ISetWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
package io.usethesource.vallang;

public interface ISetWriter extends IWriter<ISet> {

@Override
default ISetWriter unique() {
return (ISetWriter) IWriter.super.unique();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private ListWriter(boolean unique) {
}

@Override
public IWriter<IList> unique() {
public IListWriter unique() {
return new ListWriter(true);
}

Expand Down Expand Up @@ -239,4 +239,4 @@ public IList done() {
public Supplier<IWriter<IList>> supplier() {
return () -> new ListWriter();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private ListWriter(boolean unique) {
}

@Override
public IWriter<IList> unique() {
public IListWriter unique() {
return new ListWriter(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public boolean isSubtypeOfFunction(Type other) {
// For example, an overloadeded function `X f(int) + X f(str)` is substitutable at high-order parameter positions of type `X (int)`
// even though its function type is `X (value)`. Rascal's type system does not check completeness of function definitions,
// only _possible_ applicability in this manner. Every function may throw `CallFailed` at run-time
// if non of their arguments match for none of their alternatives.
// if non of their aguments match for none of their alternatives.

FunctionType otherType = (FunctionType) other;

Expand Down
Loading