Skip to content

Parser Does Not Like Method Reference Separator (::) #175

Description

@msimmon6

Describe the bug

Parse error in a file, 99% sure it is due to the :: operator. The student, by all accounts, definitely did not know what they were doing. We should still probably handle it.

Where did the bug occur

Semester: Summer 2022
Instructor & Course: Pedram's CMSC132
Project name on Submit Server: Exam 2
Student directory id: thou1

Code segment (if known & relevant):

// Just a portion, only one line is important
Collections.sort(intcollect);
int[] arr = new int[intcollect.size()];
Arrays.setAll(arr, intcollect::get);
return arr;

Additional info

image

Looks like it was expecting an operator, but not this one. It's probably a simple fix of adding :: as a valid operator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions