{"action":"created","issue":{"url":"https://api.github.com/repos/almondtools/testrecorder/issues/76","repository_url":"https://api.github.com/repos/almondtools/testrecorder","labels_url":"https://api.github.com/repos/almondtools/testrecorder/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/almondtools/testrecorder/issues/76/comments","events_url":"https://api.github.com/repos/almondtools/testrecorder/issues/76/events","html_url":"https://github.com/almondtools/testrecorder/issues/76","id":325142146,"node_id":"MDU6SXNzdWUzMjUxNDIxNDY=","number":76,"title":"Type Management in Test Generator","user":{"login":"almondtools","id":2934333,"node_id":"MDQ6VXNlcjI5MzQzMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2934333?v=4","gravatar_id":"","url":"https://api.github.com/users/almondtools","html_url":"https://github.com/almondtools","followers_url":"https://api.github.com/users/almondtools/followers","following_url":"https://api.github.com/users/almondtools/following{/other_user}","gists_url":"https://api.github.com/users/almondtools/gists{/gist_id}","starred_url":"https://api.github.com/users/almondtools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almondtools/subscriptions","organizations_url":"https://api.github.com/users/almondtools/orgs","repos_url":"https://api.github.com/users/almondtools/repos","events_url":"https://api.github.com/users/almondtools/events{/privacy}","received_events_url":"https://api.github.com/users/almondtools/received_events","type":"User","site_admin":false},"labels":[{"id":269579435,"node_id":"MDU6TGFiZWwyNjk1Nzk0MzU=","url":"https://api.github.com/repos/almondtools/testrecorder/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T05:05:23Z","updated_at":"2018-06-03T12:16:39Z","closed_at":null,"author_association":"OWNER","body":"Currently the type of serialized values is managed, the type of generated expressions (for this value) is not. This is particularly a problem if there are multiple type alternatives for an expression. E.g. a `SerializedList` of type `ArrayList` which is used as `List<String>` and `List<Object>` may generate expressions like\r\n\r\n```\r\nArrayList temp1 = ...\r\nList<String> list1 = temp1;\r\n```\r\n\r\nor \r\n\r\n```\r\nArrayList temp1 = ...\r\nList<Object> list1 = temp1;\r\n```\r\n\r\nWhile the compiler allows casting `List<String>` to `ArrayList<String>` it does not allow to cast `List<Object>` to `ArrayList<String>`.\r\n\r\nSo the types of the serialized value are not sufficient for code generation, the type of the generated expressions is. There is already an approach of expression types in the `DefaultDeserializerContext`, yet many adaptors do not rely on the expression types but on the serialized value types."},"comment":{"url":"https://api.github.com/repos/almondtools/testrecorder/issues/comments/394158250","html_url":"https://github.com/almondtools/testrecorder/issues/76#issuecomment-394158250","issue_url":"https://api.github.com/repos/almondtools/testrecorder/issues/76","id":394158250,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE1ODI1MA==","user":{"login":"almondtools","id":2934333,"node_id":"MDQ6VXNlcjI5MzQzMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2934333?v=4","gravatar_id":"","url":"https://api.github.com/users/almondtools","html_url":"https://github.com/almondtools","followers_url":"https://api.github.com/users/almondtools/followers","following_url":"https://api.github.com/users/almondtools/following{/other_user}","gists_url":"https://api.github.com/users/almondtools/gists{/gist_id}","starred_url":"https://api.github.com/users/almondtools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almondtools/subscriptions","organizations_url":"https://api.github.com/users/almondtools/orgs","repos_url":"https://api.github.com/users/almondtools/repos","events_url":"https://api.github.com/users/almondtools/events{/privacy}","received_events_url":"https://api.github.com/users/almondtools/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T12:16:39Z","updated_at":"2018-06-03T12:16:39Z","author_association":"OWNER","body":"## Approach\r\n\r\n* use a type manager for types of variables and expressions\r\n  * it contains generated expression to serialized values\r\n  * it also contains the generated type information (real type, used type) to the expressions\r\n* on each assignment of an expression add the type information (real type, used type) to the type manager\r\n* on each use of an expression/variable do not rely on the serialized value types but that from the type manager\r\n\r\nThis is probably a major change, leading to major changes in the `DeserializerContext` design"}}
{"actor":{"display_login":"almondtools"}}