Merge commit. development
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 16 Dec 2012 21:05:45 +0100
branchdevelopment
changeset 1901 02f4c2d0cebc
parent 1898 51de40865b71 (diff)
parent 1895 2d30e588124c (current diff)
child 1902 7edd54d4c29a
Merge commit.
experiments/JavaIncrementalCompiler.st
experiments/JavaIncrementalCompilerTests.st
--- a/JavaClassReader.st	Sun Dec 16 17:45:12 2012 +0100
+++ b/JavaClassReader.st	Sun Dec 16 21:05:45 2012 +0100
@@ -1845,8 +1845,9 @@
 
     JAVA isNil ifTrue:[ JavaPackage initialize ].
     [
-        "Do not enable it now, requires some changes is filing-in code"
-        language fileIn: file.
+        Class withoutUpdatingChangesDo:[
+            language fileIn: file.
+        ].
     ] on: JavaClassQuery do:[:query |
         query className = class name ifTrue:[
             query resumeWith: class
@@ -1856,6 +1857,7 @@
     ].
 
     "Created: / 06-09-2012 / 12:14:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-12-2012 / 16:48:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaClassReader methodsFor:'file reading - fields'!
--- a/JavaLookupTests.st	Sun Dec 16 17:45:12 2012 +0100
+++ b/JavaLookupTests.st	Sun Dec 16 21:05:45 2012 +0100
@@ -257,11 +257,38 @@
 !
 
 testPassingNilAsParameter
-    "nil should match any formal argument object type (so should not match primitives)"
-    
-    self assert: (self javaTestClass new overloadedMethod: nil) = 3.
+    "
+    Scenario: from smalltalk, pass a nil to an overloaded method with object-type argument.
+
+    Question: What to do? Both matches, so Ambibuous message looks good,
+    but then it behave differently if you do
+        foo overloadedMethod: 'XXX'
+        foo overloadedMethod: nil
+    than if you do
+        foo overloadedMethod: nil
+        foo overloadedMethod: 'XXX'.
+    On the other hand, which method do choose? Random one? Would lead into
+    hard-to-debug situations.
+
+    No good solution so far..."
+    <skip>
+
+    self assert: false message:'Solution wanted'
+
+"/    self 
+"/        should:[r := self javaTestClass new overloadedMethod: nil]
+"/        raise: AmbiguousMessage
 
     "Created: / 16-12-2012 / 11:35:14 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+    "Modified: / 16-12-2012 / 17:21:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+testPassingNilAsParameter2
+    "nil should match any formal argument object type (so should not match primitives)"
+
+    self assert: (self javaTestClass new overloadedMethodInt: nil) = 2.
+
+    "Created: / 16-12-2012 / 16:21:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 testSayHello
--- a/JavaRelease.st	Sun Dec 16 17:45:12 2012 +0100
+++ b/JavaRelease.st	Sun Dec 16 21:05:45 2012 +0100
@@ -922,20 +922,22 @@
 javaExtDirsOnUNIX
 
     ^{
-        self javaHome asFilename / 'lib' / 'ext' .
+        self jreHome asFilename / 'lib' / 'ext' .
         '/usr/java/packages/lib/ext' asFilename
     }
 
     "Created: / 31-08-2011 / 20:01:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-12-2012 / 15:46:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 javaExtDirsOnWindows
 
     ^{
-        self javaHome asFilename / 'lib' / 'ext' .
+        self jreHome asFilename / 'lib' / 'ext' .
     }
 
     "Created: / 31-08-2011 / 20:02:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-12-2012 / 15:46:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 javaHomesOnUNIX