Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
racket-variant: ["CS"]
enable-contracts: [true, false]
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/checkout@v6.0.1
- uses: Bogdanp/[email protected]
with:
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/resyntax-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.1
# See https://github.com/actions/checkout/issues/118.
with:
fetch-depth: 0
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Analyze changed files
run: xvfb-run racket -l- resyntax/cli analyze --local-git-repository . "origin/${GITHUB_BASE_REF}" --output-as-github-review --output-to-file ./resyntax-review.json
- name: Upload analysis artifact
uses: actions/upload-artifact@v4.6.1
uses: actions/upload-artifact@v6.0.0
with:
name: resyntax-review
path: resyntax-review.json
2 changes: 1 addition & 1 deletion .github/workflows/resyntax-autofixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.1
- name: Install Racket
uses: Bogdanp/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/resyntax-submit-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.1
- name: Download Resyntax analysis
# This uses a github script instead of the download-artifact action because
# that action doesn't work for artifacts uploaded by other workflows. See
# https://github.com/actions/download-artifact/issues/130 for more info.
uses: actions/github-script@v7.0.1
uses: actions/github-script@v8.0.0
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand All @@ -48,7 +48,7 @@ jobs:
fs.writeFileSync('${{github.workspace}}/resyntax-review.zip', Buffer.from(download.data));
- run: unzip resyntax-review.zip
- name: Create pull request review
uses: actions/github-script@v7.0.1
uses: actions/github-script@v8.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
9 changes: 9 additions & 0 deletions typed-racket-test/fail/gh-issue-1028.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#;
(exn-pred #rx"expected single value, got multiple")
#lang typed/racket

;; Issue #1028: Incorrect with-handlers usage previously caused an internal
;; typechecker error "get-range-result: should not happen". Fixed to give
;; a proper type error about expecting single value.

(with-handlers ([exn:fail? (values #f #f)]) (values #t #t))
11 changes: 11 additions & 0 deletions typed-racket-test/fail/gh-issue-1268.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#;
(exn-pred #rx"Inference for polymorphic keyword functions not supported")
#lang typed/racket

;; Issue #1268: hash-union with #:combine previously caused an internal
;; match-define error. Fixed to give a proper type error about polymorphic
;; keyword function inference.

(require racket/hash)

(hash-union (make-hash) (make-hash) #:combine (lambda (a b) a))
8 changes: 8 additions & 0 deletions typed-racket-test/fail/gh-issue-368.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#;
(exn-pred #rx"broke its own contract")
#lang typed/racket

;; Issue #368: cast with wrong type previously threw an internal error
;; "procedure-arity: contract violation" instead of a proper contract failure.

(cast 3 (-> Integer Integer))
9 changes: 9 additions & 0 deletions typed-racket-test/fail/gh-issue-425.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#;
(exn-pred #rx"cannot apply a non-polymorphic type")
#lang typed/racket

;; Issue #425: Regression test - previously caused internal error
;; "Base type L+ not in predefined-type-table" when using recursive
;; type definitions with intersection types incorrectly.

(define-type (L+ T REST) (Pairof T (∩ (L+ T Any) REST)))
16 changes: 16 additions & 0 deletions typed-racket-test/fail/gh-issue-658.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#;
(exn-pred #rx"cannot apply a non-polymorphic type")
#lang typed/racket

;; Issue #658: Invalid *-> type previously caused an internal error
;; "erroneous syntax was not a syntax object". Fixed to give a proper
;; type error about applying a non-polymorphic type.

(struct Node [{reachable : Edge}])
(struct Edge [{to : Symbol} {cost : Positive-Integer}])

(define-type Graph [Immutable-HashTable Symbol Node])

(: make-graph (Node *-> Graph))
(define (make-graph . lo-node)
(make-immutable-hash))
9 changes: 9 additions & 0 deletions typed-racket-test/succeed/gh-issue-1144.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#lang typed/racket

;; Issue #1144: Referencing certain identifiers like exn:srclocs? previously
;; caused an internal "syntax-property: contract violation" error.
;; Now properly returns the procedure.

(ann exn:srclocs? (-> Any Boolean))
(ann rename-transformer? (-> Any Boolean))
(ann set!-transformer? (-> Any Boolean))
21 changes: 21 additions & 0 deletions typed-racket-test/succeed/gh-issue-229.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#lang typed/racket

;; Issue #229: Typed units with signatures from submodules previously
;; caused a "free-id-table-ref: contract violation" internal error.
;; Now type checks correctly.

(module a typed/racket
(provide foo^)

(define-signature foo^
([some-class% : ClassTop])))

(require 'a)

(define-unit foo@
(import)
(export foo^)

(define some-class%
(class object%
(super-new))))
17 changes: 17 additions & 0 deletions typed-racket-test/succeed/gh-issue-318.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#lang typed/racket

;; Issue #318: Regression test - previously caused internal error when overriding
;; a method that returns multiple values including 'this'.
;; This was fixed in an earlier version of Typed Racket.

(define atree%
(class object%
(super-new)
(define/public (m)
(values #f this))))

(define state%
(class atree%
(super-new)
(define/override (m)
(values #f this))))
11 changes: 11 additions & 0 deletions typed-racket-test/succeed/gh-issue-378.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#lang typed/racket

;; Issue #378: cast in dead code previously caused an internal error
;; "contract-def-property: thunk called too early". Now works correctly.

(define result
(cond [#false (cast 1 Integer)]
[else 2]))

(unless (= result 2)
(error "expected 2"))
10 changes: 10 additions & 0 deletions typed-racket-test/succeed/gh-issue-82.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang typed/racket

;; Issue #82: Previously caused internal error "Tried to move vars to
;; dbound that already exists" when using plambda with dotted type
;; variables. Now type checks correctly.

(: f (-> One (List One String Char) : #:object (0 0)))
(define (f [x : One])
(let ([f (plambda: (a ...) [w : a ... a] w)])
(f x "hello" #\c)))