{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/321","repository_url":"https://api.github.com/repos/tbeu/ModelicaSpecification","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/321/comments","events_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/321/events","html_url":"https://github.com/tbeu/ModelicaSpecification/issues/321","id":372179420,"node_id":"MDU6SXNzdWUzNzIxNzk0MjA=","number":321,"title":"Is modification or redeclaration of protected elements allowed or not?","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":1097433286,"node_id":"MDU6TGFiZWwxMDk3NDMzMjg2","url":"https://api.github.com/repos/tbeu/ModelicaSpecification/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false},"assignees":[{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/45","html_url":"https://github.com/tbeu/ModelicaSpecification/milestone/45","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/45/labels","id":3752879,"node_id":"MDk6TWlsZXN0b25lMzc1Mjg3OQ==","number":45,"title":"ModelicaSpec3.2rev2","description":"","creator":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":21,"state":"closed","created_at":"2018-10-19T18:41:34Z","updated_at":"2018-10-20T06:27:08Z","due_on":"2012-09-07T07:00:00Z","closed_at":"2018-10-19T18:41:34Z"},"comments":3,"created_at":"2018-10-20T06:27:08Z","updated_at":"2018-10-20T06:27:49Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Reported by adrpo on 29 Jan 2013 14:43 UTC**\nModelica specification say:\n4.1 Access Control – Public and Protected Elements\nProtected elements in classes cannot be accessed via dot notation. They may not be modified or redeclared in a class modification.\n\nHowever, we have in MSL 3.2.1:\n```\n// At Vessels.mo:191:\npartial model PartialLumpedVessel\nprotected // Vessels.mo:270\n  input SI.Height fluidLevel = 0\nend PartialLumpedVessel;\n\n// At Vessels.mo:75\nmodel OpenTank\n   extends PartialLumpedVessel(final fluidLevel = level);\nend OpenTank;\n```\n\nIn this case fluidLevel is protected and it appears in a class\nmodification which is \\*NOT\\* allowed conform to the specification.\nIs MSL 3.2.1 wrong or is Modelica Spec 3.2 wrong?\n\nModification or redeclaration of \nprotected elements appears in more \nplaces in MSL than this one.\n\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/975"},"comment":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/comments/431553954","html_url":"https://github.com/tbeu/ModelicaSpecification/issues/321#issuecomment-431553954","issue_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/321","id":431553954,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTU1Mzk1NA==","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T06:27:49Z","updated_at":"2018-10-20T06:27:49Z","author_association":"COLLABORATOR","body":"**Comment by adrpo on 29 Jan 2013 16:04 UTC**\n \nOf course, accessing via inheritation should be allowed, \nthe question is about modification or redeclaration.\n\n```\nparameter Real myLevel=fluidLevel;\n```\nthis is fine as it only accesses fluidLevel, not modifying it.\n\n```\nA a(ves(fluidLevel=3));\n```\n\nthis is an error as you can translate it to an internal dot form:\n\n```\nA a(ves.fluidLevel = 3);\n```\n\nwhich is of course illegal as it is accessed via dot notation.\n\nI think the specification should be clarified \nas otherwise the MSL is yet again not legal.\n\nNote that if you allow modification/redeclaration of \nprotected elements you would need for these 2 things:\n1. not allowed to be accessed via dot notation\n2. not allowed to be modified via modification\n\n```\nprotected final x = y.\n```\ncurrently protected is enough.\n\n"}}
{"actor":{"display_login":"modelica-trac-importer"}}