{"action":"opened","issue":{"url":"https://api.github.com/repos/jcoplien/trygve/issues/112","repository_url":"https://api.github.com/repos/jcoplien/trygve","labels_url":"https://api.github.com/repos/jcoplien/trygve/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/jcoplien/trygve/issues/112/comments","events_url":"https://api.github.com/repos/jcoplien/trygve/issues/112/events","html_url":"https://github.com/jcoplien/trygve/issues/112","id":153546335,"number":112,"title":"Liskov substitution principle","user":{"login":"mbrowne","id":874316,"avatar_url":"https://avatars.githubusercontent.com/u/874316?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrowne","html_url":"https://github.com/mbrowne","followers_url":"https://api.github.com/users/mbrowne/followers","following_url":"https://api.github.com/users/mbrowne/following{/other_user}","gists_url":"https://api.github.com/users/mbrowne/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrowne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrowne/subscriptions","organizations_url":"https://api.github.com/users/mbrowne/orgs","repos_url":"https://api.github.com/users/mbrowne/repos","events_url":"https://api.github.com/users/mbrowne/events{/privacy}","received_events_url":"https://api.github.com/users/mbrowne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-06T21:56:43Z","updated_at":"2016-05-06T21:56:43Z","closed_at":null,"body":"Should trygve be enforcing the Liskov substitution principle? I had heard this principle referenced before, but just today actually learned about it...so I may not understand it fully yet, but it seems that this code should not compile, but it does:\r\n\r\n\tclass A {\r\n\t\tpublic void foo(int x, int y) {}\r\n\t}\r\n\r\n\tclass B extends A {\r\n\t\tpublic void foo(int x) {}\r\n\t}\r\n\t\r\n\t{\r\n\t\t//this should compile\r\n\t\tnew A().foo(1, 2);\r\n\t\t//but this should not, right?\r\n\t\tnew B().foo(1, 2);\r\n\t}\r\n\r\nAdditionally, I get the following error when running the code:\r\n\r\n\tError: User process died because of internal trygve error: java.lang.AssertionError\r\n\tpopping stack: type is RTIntegerObject\r\n\tpopping stack: type is RTIntegerObject\r\n\tpopping stack: type is RTObjectCommon\r\n\t\tIn script `A.foo'\r\n\r\n\tjava.lang.AssertionError\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher.genericPolymorphicMethodLookup(RTMessageDispatcher.java:609)\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher.genericMethodDeclLookup(RTMessageDispatcher.java:687)\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher$RTNonContextToNonContext.getMethodDecl(RTMessageDispatcher.java:854)\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher.commonWrapup(RTMessageDispatcher.java:392)\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher$RTNonContextToNonContext.<init>(RTMessageDispatcher.java:840)\r\n\t\tat info.fulloo.trygve.run_time.RTMessageDispatcher.makeDispatcher(RTMessageDispatcher.java:76)\r\n\t\tat info.fulloo.trygve.run_time.RTExpression$RTMessage.run(RTExpression.java:708)\r\n\t\tat info.fulloo.trygve.run_time.RunTimeEnvironment.runner(RunTimeEnvironment.java:445)\r\n\t\tat info.fulloo.trygve.run_time.RunTimeEnvironment.run(RunTimeEnvironment.java:227)\r\n\t\tat info.fulloo.trygve.editor.TextEditorGUI.simpleRun(TextEditorGUI.java:994)\r\n\t\tat info.fulloo.trygve.editor.TextEditorGUI$32.doInBackground(TextEditorGUI.java:1060)\r\n\t\tat info.fulloo.trygve.editor.TextEditorGUI$32.doInBackground(TextEditorGUI.java:1053)\r\n\t\tat javax.swing.SwingWorker$1.call(SwingWorker.java:296)\r\n\t\tat java.util.concurrent.FutureTask.run(FutureTask.java:262)\r\n\t\tat javax.swing.SwingWorker.run(SwingWorker.java:335)\r\n\t\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\r\n\t\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\r\n\t\tat java.lang.Thread.run(Thread.java:745)"}}