-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Crash in compilation from tasty #19629
Comments
I don't think the bisect is correct. Both of those nightly versions crash with the also pretty much any commit is failing to compile this code with |
@WojciechMazur this even crashes in the exact same way since 3.0.0, maybe you have some different steps to reproduce the "ok" version? |
I assume that if it compiles fine with standard compilation, and fails only if |
I'm fine to treat it as just a standard tasty error, but I'm wondering how you got it to not crash and instead make a normal error |
with some improved debugging output, we get this error:
this becomes clear why with the TASTy generated: 129: DEFDEF(161) 19 [visit]
133: TYPEPARAM(7) 20 [R]
136: TYPEBOUNDStpt(4)
138: SHAREDtype 17
140: SHAREDtype 23
142: PARAM(143) 21 [caseInFst]
146: REFINEDtpt(139)
149: TYPEREF 22 [PolyFunction]
151: SHAREDtype 19
153: DEFDEF(132) 23 [apply]
157: TYPEPARAM(18) 24 [F1]
160: LAMBDAtpt(15)
162: TYPEPARAM(7) 25 [[Unique _$ 6]]
165: TYPEBOUNDStpt(4)
167: SHAREDtype 17
169: SHAREDtype 23
171: TYPEBOUNDStpt(4)
173: SHAREDtype 17
175: SHAREDtype 23
177: TYPEPARAM(7) 26 [Y]
180: TYPEBOUNDStpt(4)
182: SHAREDtype 17
184: SHAREDtype 23
186: PARAM(23) 27 [k]
189: APPLIEDtpt(20)
191: IDENTtpt 2 [Knit]
193: TYPEREFsymbol 5
195: THIS
196: TYPEREFpkg 1 [<empty>]
198: IDENTtpt 3 [CP]
200: TYPEREFsymbol 12
202: THIS
203: SHAREDtype 193
206: IDENTtpt 24 [F1]
208: TYPEREFdirect 157
211: REFINEDtpt(74)
213: APPLIEDtpt(58)
215: TYPEREF 28 [Function1]
217: SHAREDtype 19
219: APPLIEDtpt(49)
221: IDENTtpt 29 [TypeEqK]
223: TYPEREF 29 [TypeEqK]
225: SHAREDtype 195
228: IDENTtpt 10 [F]
230: TYPEREFsymbol 41
232: SHAREDtype 202
235: LAMBDAtpt(33)
237: TYPEPARAM(7) 30 [x]
240: TYPEBOUNDStpt(4)
242: SHAREDtype 17
244: SHAREDtype 23
246: APPLIEDtpt(22)
248: IDENTtpt 3 [CP]
250: SHAREDtype 200
253: APPLIEDtpt(10)
255: IDENTtpt 24 [F1]
257: SHAREDtype 208
260: IDENTtpt 30 [x]
262: TYPEREFdirect 237
265: IDENTtpt 26 [Y]
267: TYPEREFdirect 177
270: TYPEREFdirect 133
273: DEFDEF(12) 23 [apply]
276: PARAM(4) 31 [ev]
279: SHAREDterm 219
282: IDENTtpt 20 [R]
284: SHAREDtype 270
287: SYNTHETIC
288: IDENTtpt 20 [R]
290: SHAREDtype 270 because the final result type Here is the trace: at address |
According to @sjrd this has to be fixed before it reaches TASTy, e.g. by having a type derived from the tree, rather than duplicating the tree - otherwise there's a whole mess in trying to keep track of which symbols have duplicates |
We don't need to repeat the tree twice, instead derive a type tree from the original tree, and reuse its spans. fixes #19629
Compilation from tasty of this code has always failed, however, recently it stated to crash compiler instead of returning error.
This issue points to 2 bugs:
Compiler version
Last good release: 3.4.0-RC1-bin-20231030-e2c9dc0-NIGHTLY
First bad release: 3.4.0-RC1-bin-20231031-58810fd-NIGHTLY
Bisect points to 7fc4341
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: