Skip to content

Commit

Permalink
Add some generic type arguments (#1365)
Browse files Browse the repository at this point in the history
Everything seems to compile fine with these changes. Let's us get rid of
a rawtypes suppression.
  • Loading branch information
msridhar authored Jan 22, 2024
1 parent f7f4df0 commit 675cee8
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,23 @@ public Iterator<AbstractStatement> getStatements() {
}

@Override
@SuppressWarnings("rawtypes")
public void addStatement(IFixedPointStatement statement)
public void addStatement(IFixedPointStatement<T> statement)
throws IllegalArgumentException, UnimplementedError {
if (statement == null) {
throw new IllegalArgumentException("statement == null");
}
if (statement instanceof UnaryStatement) {
addStatement((UnaryStatement) statement);
addStatement((UnaryStatement<T>) statement);
} else if (statement instanceof NullaryStatement) {
addStatement((NullaryStatement) statement);
addStatement((NullaryStatement<T>) statement);
} else if (statement instanceof GeneralStatement) {
addStatement((GeneralStatement) statement);
addStatement((GeneralStatement<T>) statement);
} else {
Assertions.UNREACHABLE("unexpected: " + statement.getClass());
}
}

public void addStatement(GeneralStatement<?> s) {
public void addStatement(GeneralStatement<T> s) {
if (s == null) {
throw new IllegalArgumentException("s is null");
}
Expand Down Expand Up @@ -134,7 +133,7 @@ public void addStatement(GeneralStatement<?> s) {
}
}

public void addStatement(UnaryStatement<?> s) {
public void addStatement(UnaryStatement<T> s) {
if (s == null) {
throw new IllegalArgumentException("s is null");
}
Expand All @@ -157,7 +156,7 @@ public void addStatement(UnaryStatement<?> s) {
}
}

public void addStatement(NullaryStatement<?> s) {
public void addStatement(NullaryStatement<T> s) {
if (s == null) {
throw new IllegalArgumentException("s is null");
}
Expand Down

0 comments on commit 675cee8

Please sign in to comment.