You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importorg.checkerframework.checker.index.qual.IndexFor;
publicclassSameLenCustom {
abstractstaticclassXYDataset {
abstractpublicint[] getSeries(intitem);
}
abstractclassIntervalXYDatasetextendsXYDataset {
abstractdoublegetXValue(intseries, @IndexFor("this.getSeries(#1)") intp);
}
publicvoiddrawItem(XYDatasetdataset, intseries,
@IndexFor("#1.getSeries(#3)") intitem) {
IntervalXYDatasetintervalDataset = (IntervalXYDataset) dataset;
// Index Checker error on next line, but intervalDataset should be @SameLen("dataset")doublex = intervalDataset.getXValue(series, item);
}
}
produces:
SameLenCustom.java:17: error: [argument.type.incompatible] incompatible types in argument.
double x = intervalDataset.getXValue(series, item);
^
found : @LTLengthOf(value="dataset.getSeries(item)", offset={}) int
required: @LTLengthOf(value="intervalDataset.getSeries(series)", offset={}) int
1 error
The problem is that the UpperBound checker doesn't know that dataset and intervalDataset reference the same object.
The text was updated successfully, but these errors were encountered:
produces:
The problem is that the UpperBound checker doesn't know that
dataset
andintervalDataset
reference the same object.The text was updated successfully, but these errors were encountered: