[Task]: Handle duplicate typedesc creation for remaining case #43667
Labels
Area/BIR
Compiler BIR related issues #Compiler
Area/Desugar
Issue related Desugar and Code optimizer #Compiler
Team/CompilerFE
All issues related to Language implementation and Compiler, this exclude run times.
Type/Task
userCategory/Compilation
Description
Duplicate typedesc creation for type definitions and in statement level is handled by #38844. How ever there are few cases left to be handled only for anonymous types. Please find the cases below. Record type works fine since it has a type definition created.
function-signature := ( param-list ) return-type-descriptor (param list also contains typedesc)
Expressions can contain anonymous type descriptors. Those are not handled at the global level.
eg:
int a = int a = let [int] a = [1] in a[0];
boolean bool = someVar is [int];
object-field in module class definition :=
metadata [object-visibility-qual] [final]
type-descriptor field-name [= field-initializer] ;
listener-decl :=
metadata
[public] listener [type-descriptor] variable-name = expression ;
service-decl :=
metadata [isolated-qual]
service [type-descriptor] [attach-point] on expression-list object-constructor-block [;]
annotation-decl :=
metadata
[public] [const] annotation [type-descriptor] annot-tag
For samples like below
The row type will be Immutable Identifier and there will be no intersection type definition created for that. Only the immutable record type is created. Because of that no typedesc created for row type intersection at
Desugar
.BIRGen
will create duplicate type desc.Describe your task(s)
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: