-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete switch constructor #415
Changes from 7 commits
1b0b750
bea7472
9d5b17c
e53b51e
88cae89
9d59306
91f20b0
8eb112a
7a9b38a
74c5a7b
73bf47c
8ea472d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -956,6 +956,8 @@ Completable: Cnone | |
|
||
Complete tests/src/Completion.res 243:8 | ||
posCursor:[243:8] posNoWhite:[243:7] Found expr:[241:8->246:1] | ||
XXX Pexp_match with 1 cases not handled | ||
XXX first case pattern:[242:2->242:10] expression:[242:14->245:8] | ||
posCursor:[243:8] posNoWhite:[243:7] Found expr:[242:14->245:8] | ||
posCursor:[243:8] posNoWhite:[243:7] Found expr:[242:14->245:1] | ||
Pexp_apply ...[243:3->243:4] (...[242:14->242:15], ...[243:5->245:1]) | ||
|
@@ -1030,6 +1032,7 @@ Completable: Cpath Value[SomeLocal] | |
}] | ||
|
||
Complete tests/src/Completion.res 271:20 | ||
posCursor:[271:20] posNoWhite:[271:19] Found pattern:[271:7->274:3] | ||
posCursor:[271:20] posNoWhite:[271:19] Found type:[271:11->274:3] | ||
Ptyp_constr SomeLocal:[271:11->274:3] | ||
Completable: Cpath Type[SomeLocal] | ||
|
@@ -1313,6 +1316,7 @@ posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->346:23] | |
posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->338:6] | ||
posCursor:[336:26] posNoWhite:[336:25] Found expr:[335:6->338:5] | ||
posCursor:[336:26] posNoWhite:[336:25] Found expr:[336:16->338:5] | ||
posCursor:[336:26] posNoWhite:[336:25] Found pattern:[336:20->338:5] | ||
posCursor:[336:26] posNoWhite:[336:25] Found type:[336:23->338:5] | ||
Ptyp_constr Res:[336:23->338:5] | ||
Completable: Cpath Type[Res] | ||
|
@@ -1332,6 +1336,8 @@ Completable: Cpath Type[Res] | |
|
||
Complete tests/src/Completion.res 343:57 | ||
posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:10->346:23] | ||
XXX Pexp_match with 1 cases not handled | ||
XXX first case pattern:[343:29->343:49] expression:[343:53->346:23] | ||
posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:53->346:23] | ||
posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:53->343:57] | ||
Pexp_ident this:[343:53->343:57] | ||
|
@@ -1381,3 +1387,32 @@ posCursor:[355:23] posNoWhite:[355:22] Found expr:[0:-1->355:23] | |
posCursor:[355:23] posNoWhite:[355:22] Found expr:[355:12->355:23] | ||
[] | ||
|
||
Complete tests/src/Completion.res 362:8 | ||
posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] | ||
posCursor:[362:8] posNoWhite:[362:7] Found expr:[361:2->365:3] | ||
XXX Pexp_match with 1 cases not handled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shows that parser recovery leads to a single case being considered in the switch. |
||
XXX first case pattern:[362:7->364:5] expression:[364:9->364:10] | ||
posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->364:5] | ||
posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->362:8] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the location, this could be the pattern |
||
XXX Ppat_construct T:[362:7->362:8] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed here's the |
||
[] | ||
|
||
Complete tests/src/Completion.res 367:30 | ||
posCursor:[367:30] posNoWhite:[367:29] Found expr:[367:11->376:3] | ||
posCursor:[367:30] posNoWhite:[367:29] Found expr:[367:16->376:3] | ||
XXX Pexp_match with 1 cases not handled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shows that parser recovery also gives 1 case when no more cases others follow. |
||
XXX first case pattern:[367:29->367:30] expression:[370:0->376:3] | ||
posCursor:[367:30] posNoWhite:[367:29] Found pattern:[367:29->367:30] | ||
XXX Ppat_construct T:[367:29->367:30] | ||
[] | ||
|
||
Complete tests/src/Completion.res 372:8 | ||
posCursor:[372:8] posNoWhite:[372:7] Found expr:[370:8->376:3] | ||
posCursor:[372:8] posNoWhite:[372:7] Found expr:[371:2->376:3] | ||
XXX Pexp_match with 2 cases not handled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example confirms that the first 2 cases are squashed into one. |
||
XXX first case pattern:[372:7->374:5] expression:[374:18->374:19] | ||
posCursor:[372:8] posNoWhite:[372:7] Found pattern:[372:7->374:5] | ||
posCursor:[372:8] posNoWhite:[372:7] Found pattern:[372:7->372:8] | ||
XXX Ppat_construct T:[372:7->372:8] | ||
[] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, and other similar lines indicate that this affects a bit existing test cases, but does not lead to a different outcome.
It just means that the relevant type, found below, happens to be inside a pattern containing the cursor.